This article is from the Ethernet FAQ, by James Messer James@NetworkUptime.com with numerous contributions by others.
Two Ethernet stations can be directly attached to each other, but
the cabling will be wired differently than a normal 10BASE-T
Ethernet network connection. The 802.3 specification refers to this
direct connection between two stations as a crossover function.
The crossover function is accomplished by simply wiring the receive
pins to the transmit pins:
Contact 1 - Contact 3
Contact 2 - Contact 6
Contact 3 - Contact 1
Contact 6 - Contact 2