Patent ID: 7581247

Claim:
A method of processing IP datagrams from a local device on a LAN using local IP addresses through a network address translating (“NAT”) gateway to an external device on an external network comprising: maintaining one or more tables associating local IP addresses of local devices on said LAN, external IP addresses of external devices on said external network, port addresses of said local devices, port addresses of said external devices, security parameter index (“SPI”)-in values, and SPI-out values; receiving a datagram from the local device on said LAN; determining whether said datagram is encrypted and, if said datagram is encrypted, determining whether an SPI of said datagram is recorded in said one or more tables and, if so, modifying a source IP address of said datagram to be an external IP address of said NAT gateway and passing said datagram to said external network for routing and delivery to an external device having an IP address that corresponds to a destination IP address of said datagram; and if said SPI is not recorded in said one or more tables, setting an SPI-out field corresponding to the IP address of said external device equal to said SPI and setting an associated SPI-in field of said one or more tables to zero, modifying said source IP address of said datagram to be said external IP address of said NAT gateway, and passing said datagram to said external network for routing and delivery to said external device, and if said datagram is not encrypted, determining whether a destination port address for said datagram is a predetermined process-specific port address and, if not, performing normal address translation upon said datagram and passing said datagram to said external network for routing and delivery to said external device, and if said destination port address is the predetermined process-specific port address, determining whether said destination port address is bound to an IP address; and if said destination port address is not bound to an IP address, modifying said source IP address of said datagram to be said external IP address for said NAT gateway, binding said destination port address to a local IP address of said local device and creating an association between said destination port address and said external IP address of said external device, and passing said datagram to said external network for routing and delivery to said external device.