Enabling NAT (Windows Embedded CE 6.0)
1/6/2010
The following steps show how to enable NAT for a Windows Embedded CE-based device using IPv4.
To enable NAT
Enable IP forwarding by setting the HKEY_LOCAL_MACHINE\Comm\Tcpip\Parms\IpEnableRouter registry key equal to 1.
Set the HKEY_LOCAL_MACHINE\Comm\ConnectionSharing\EnableAddressTranslation registry key equal to a non-zero value.
Set the HKEY_LOCAL_MACHINE\Comm\ConnectionSharing\PublicInterface registry key to the public interface on which you want to enable NAT. This value should contain a string that indicates the adapter instance for a network card, or that indicates the RAS connection name for a dial-up connection.
NAT mappings expire after a certain amount of time if the mappings are not used. The default expiration time is 24 hours for TCP connections, and 1 minute for UDP mappings. You can configure these expiration times by setting registry subkeys contained under the HKEY_LOCAL_MACHINE\Comm\IPNat registry key.
The following table shows optional registry subkeys that you can use to configure these expiration times.
Subkey | Description |
---|---|
TCPTimeoutSeconds_ |
Specifies the amount of time before TCP mappings expire in the NAT, if the mappings are not used. |
UDPTimeoutSeconds |
Specifies the amount of time before UDP mappings expire in the NAT, if the mappings are not used. |