1. A method implemented by a data processing apparatus, the method comprising: receiving an outbound packet from a virtual machine executing on the data processing apparatus, the outbound packet having header information including a destination Internet Protocol (IP) address, a destination port, a source IP address, and a first source port, and wherein the source IP address and the first source port are associated with the virtual machine; in response to receiving the outbound packet, selecting a second source port different than the first source port from a plurality of ports associated with the virtual machine; in response to selecting the second source port: changing the first source port in the header information of the outbound packet to the second source port, to establish a modified outbound packet; and maintaining the source IP address in the header information of the modified outbound packet; and sending the modified outbound packet over a network to a gateway separate from the data processing apparatus, wherein the gateway is configured to change the source IP address of the modified outbound packet to an IP address of the gateway and to maintain the second source port in the header information of the modified outbound packet before routing the modified outbound packet to its destination.