This document shows how to set up different types of VPNs when you are also running Network Address Translation (NAT). It includes the following sections:
Source Address Considerations
VPN Between Two Routers With NAT on Remote Router
VPN Between a Router With NAT and a SunScreen SKIP Client
VPN Between Two Routers With NAT on Two Interfaces on Remote Router
Running VPN and NAT on Two Separate Routers at the Same Site
Note:
Each of the examples in this chapter assumes you have already added an IP tunnel with SKIP and created a certificate as described in Creating an IP Tunnel With SKIP and Creating Certificates.
manually setting the NAT global IP address to the source address of the tunnel.
OR
adding a fixed IP address mapping in your NAT configuration that maps the tunnel source address to itself. By setting these addresses to the same value, you set up a "no translation" NAT service for that IP address, causing NAT to not translate that IP address.
Figure 12 VPN Between Two Routers With NAT on the Remote Router

Interface 0 is the Ethernet (LAN) interface.
Interface 1 is the physical WAN interface to the Internet. The Central router uses a fixed IP address (128.185.20.1). The Remote router uses a dynamic IP address.
Interface 6 is an IP Tunnel interface with SKIP. Each router treats the tunnel interface as an unnumbered point-to-point link (IP address 0.0.0.6).

Config>network 6
Circuit Configuration
Circuit Config <NET-6>
Circuit Config <NET-6> set destination
Assign destination address name [] central
Circuit Config <NET-6> iptnl
IP Tunnel Configuration
IP Tunnel <NET-6> set destination-address central
IP Tunnel Destination Address? 128.185.20.1
IP Tunnel <NET-6> exit
Note:
You do not have to explicitly add the destination Central at the IP Tunnel prompt because you already set the destination at the Circuit Config> prompt. If you configure the IP Tunnel before you set the destination, you must add the destination at the IP Tunnel prompt using the add remote command.
The MD5/UDH signature you enter in this step is the signature that Central displayed when you created a certificate on that router.
Circuit Config <NET-6> skip
SKIP Configuration
SKIP Config <NET-6> set remote-name central md5/udh
Peer's MD5/UDH Signature? 0011-2233-4455-6677-8899-AABB-CCDD-EEFF
Since the Remote router's IP address changes each time it connects to the ISP, the Central router cannot use the source IP address of incoming packets to identify traffic from Remote. Instead, the signature of the UDH certificate, identifies the source of the packet.
In this case, you do not have to add the destination Central because you already added that destination in the IP Tunnel configuration. If you configure SKIP first, you must add the destination before you can configure it.
Answer No to the prompt "Is this interface a tunnel to a single SKIP PC or workstation" because the router at the other end of the tunnel is providing access for a LAN, not a single PC.
SKIP Config <NET-6> exit
Circuit Config <NET-6> exit
Config> protocol ip
IP config>add address
Which net is this address for [0]? 6
New address [0.0.0.0]? 0.0.0.6
Is this interface a tunnel to a single SKIP PC or workstation(Yes or [No]): no
IP config>add route
IP destination [0.0.0.0]?
Address mask [0.0.0.0]?
Via gateway at [0.0.0.0]? 0.0.0.1
Cost [1]?
NAT Config>enable nat
Interface number [1]?
Default NAT interface created
NAT enabled on interface 1
IP config>add route
IP destination [0.0.0.0]?128.185.0.0
Address mask [255.255.0.0]?
Via gateway at [0.0.0.0]? 0.0.0.6
Cost [1]?
Config>network 6
Circuit Configuration
Circuit Config <NET-6>
Note: You do not need to know the address of the remote site. SKIP identifies the remote site by mapping the SKIP MD5/UDH signature in each packet to the name the administrator of the remote site assigned. In this case, that name is Remote.
Circuit Config <NET-6> set destination
Assign destination address name [ ]? remote
Circuit Config <NET-6> skip
SKIP Configuration
SKIP Config <NET-6> set remote-name remote md5/udh
Peer's MD5/UDH Signature? 8033-CCC1-87DB-8367-FAAB-52A2-03A2-1BAE
Note:
You do not need to explicitly add the remote destination name to the SKIP configuration because you set the destination to Remote at the Circuit Config> prompt.
SKIP Config <NET-6> set local-name default local/udh 1024
Note: Since this example uses default, this setting is the default for all SKIP tunnels that this router originates.
SKIP Config <NET-6> exit
Circuit Config <NET-6> exit
Config>protocol ip
Internet protocol user configuration
IP config>add address
Which net is this address for [0]? 6
New address [0.0.0.0]? 0.0.0.6
Is this interface a tunnel to a single SKIP PC or workstation(Yes or [No]): no
IP config>add route
IP destination [0.0.0.0]?
Address mask [0.0.0.0]?
Via gateway at [0.0.0.0]? 0.0.0.1
Cost [1]?
IP config>add route
IP destination [0.0.0.0]?10.10.2.0
Address mask [255.255.0.0]?255.255.255.0
Via gateway at [0.0.0.0]? 0.0.0.6
Cost [1]?
Figure 14 VPN with SunScreen SKIP for Windows

128.185.30.2 is the IP address of the router's physical WAN interface that acts as the gateway to the Internet. You configure this fixed IP address in SunScreen SKIP for Windows as the Tunnel endpoint address.
NAT is running on the router's physical WAN interface. NAT uses the IP address of the WAN interface, 128.185.30.2, as the NAT global IP address.
Because NAT is enabled on the router, the protected LAN (10.30.3.0) can use IP addresses that are not valid on the Internet.
The address of the PC can vary as long as the PC always initiates traffic to the router. The PC can have any IP address because the MD5/UDH name in SKIP packets identifies the PC. Once the PC sends a packet, the router learns the PC's current IP address and sends traffic back to the PC via that address.
Because the address of the PC varies, you set up the tunnel interface on the router to dynamically assume the address of the PC.

The software displays the MD5 signature of the certificate. In Figure 15, the example value SunScreen SKIP displays is 0011-2233-4455-6677-8899-AABB-CCDD-EEFF. You enter this number in the router configuration later.
-Network accessed via SKIP, 10.30.3.0 in this example
-Security type, SKIP
-Tunnel endpoint address, 128.185.30.2 in this example
-NetMask, 255.255.255.0 in this example
Config>network 6
Circuit Configuration
Circuit Config <NET-6> skip
SKIP Configuration
SKIP Config <NET-6>
SKIP Config <NET-6> add remote jimmy
SKIP Config <NET-6> set remote-name jimmy md5/udh
Peer's MD5/UDH Signature? 0011-2233-4455-6677-8899-AABB-CCDD-EEFF
SKIP Config <NET-6> set local-name jimmy local/udh 512
SKIP Config <NET-6> exit
Circuit Config <NET-6> exit
Config>protocol ip
Internet protocol user configuration
IP config>
Since the SKIP client in this example uses a dynamically-assigned IP address, add a dynamic IP address to the SKIP interface. To do so, use 0.0.0.n, where n is the interface number. Answer Yes to the prompt, "Is this interface a tunnel to a single SKIP PC or workstation." (See IP Addressing on Interfaces That Connect to a SunScreen SKIP for Windows Client.)
IP config>add address
Which net is this address for [0]? 6
New address [0.0.0.0]? 0.0.0.6
Is this interface a tunnel to a single SKIP PC or workstation(Yes or [No]): yes
IP config>add route
IP destination [0.0.0.0]?
Address mask [0.0.0.0]?
Via gateway at [0.0.0.0]? 0.0.0.1
Cost [1]?
NAT Config>enable nat
Interface number [1]?
Default NAT interface created
NAT enabled on interface 1
In this example, the router Remote simulates a single SKIP PC connection to the router Central. The advantage to this configuration is that if you have many remote sites connecting to a central site router, you do not have to set up static routes on the central router to each remote site. You also do not need to have non-overlapping private IP addresses on your remote sites because NAT hides those private addresses from other sites. For this configuration to work, the remote sites must always initiate sessions to the central site.
Figure 16 VPN Between Two Routers With NAT on
Two Interfaces on Remote Router
Interface 0 is the Ethernet (LAN) interface.
Interface 1 is the physical WAN interface to the Internet. The Central router uses a fixed IP address (128.185.30.1). The Remote router uses a dynamic IP address and has NAT enabled on Interface 1.
Interface 6 is an IP Tunnel interface with SKIP. Each router treats the tunnel interface as an unnumbered point-to-point link (shown as IP address 0.0.0.6). On the Remote router, NAT is enabled on Interface 6.

Config>network 6
Circuit Configuration
Circuit Config <NET-6>
Circuit Config <NET-6> set destination
Assign destination address name [] central
Circuit Config <NET-6> iptnl
IP Tunnel Configuration
IP Tunnel <NET-6> set destination-address central
IP Tunnel Destination Address? 128.185.30.1
IP Tunnel <NET-6> exit
Note:
You do not have to add the destination Central at the IP Tunnel prompt because you already set the destination at the Circuit Config> prompt. If you configure the IP Tunnel before you set the destination, you must add the destination at the IP Tunnel prompt using the add remote command.
The MD5/UDH signature you enter in this step is the signature that Central displayed when you created a certificate on that router.
Circuit Config <NET-6> skip
SKIP Configuration
SKIP Config <NET-6> set remote-name central md5/udh
Peer's MD5/UDH Signature? 0011-2233-4455-6677-8899-AABB-CCDD-EEFF
Since the Remote router's IP address changes each time it connects to the ISP, the Central router cannot use the source IP address of incoming packets to identify traffic from Remote. Instead, the signature of the UDH certificate, identifies the source of the packet.
In this case, you do not have to add the destination Central because you already added that destination in the IP Tunnel configuration. If you configure SKIP first, you must add the destination before you can configure it.
Answer No to the prompt "Is this interface a tunnel to a single SKIP PC or workstation" because the router at the other end of the tunnel is providing access for a LAN, not a single PC.
SKIP Config <NET-6> exit
Circuit Config <NET-6> exit
Config> protocol ip
IP config>add address
Which net is this address for [0]? 6
New address [0.0.0.0]? 0.0.0.6
Is this interface a tunnel to a single SKIP PC or workstation(Yes or [No]): no
IP config>add route
IP destination [0.0.0.0]?
Address mask [0.0.0.0]?
Via gateway at [0.0.0.0]? 0.0.0.1
Cost [1]?
NAT Config>enable nat
Interface number [1]?
Default NAT interface created
NAT enabled on interface 1
NAT Config>enable nat
Interface number [6]?
Default NAT interface created
NAT enabled on interface 6
IP config>add route
IP destination [0.0.0.0]?128.185.0.0
Address mask [255.255.0.0]?
Via gateway at [0.0.0.0]? 0.0.0.6
Cost [1]?
Config>network 6
Circuit Configuration
Circuit Config <NET-6>
Note: You do not need to know the address of the remote site. SKIP identifies the remote site by mapping the SKIP MD5/UDH signature in each packet to the name the administrator of the remote site assigned. In this case, that name is Remote.
Circuit Config <NET-6> set destination
Assign destination address name [ ]? remote
Circuit Config <NET-6> skip
SKIP Configuration
SKIP Config <NET-6> set remote-name remote md5/udh
Peer's MD5/UDH Signature? 8033-CCC1-98DB-8367-FAAB-52A2-03A2-1BAE
Note:
You do not need to explicitly add the remote destination name to the SKIP configuration because you set the destination to Remote at the Circuit Config> prompt.
SKIP Config <NET-6> set local-name default local/udh 1024
Note: Since this example uses default, this setting is the default for all SKIP tunnels that this router originates.
Since the SKIP client in this example uses a dynamically-assigned IP address, add a dynamic IP address to the SKIP interface. To do so, use 0.0.0.n, where n is the interface number.
Even though this tunnel connects to a router and not a single PC, answer Yes to the prompt, "Is this interface a tunnel to a single SKIP PC or workstation." Because NAT is running on both the physical WAN interface and the IP Tunnel interface on the Remote router, the remote site uses only one global IP address. The remote site therefore simulates a single SKIP PC connection to the central site. (See IP Addressing on Interfaces That Connect to a SunScreen SKIP for Windows Client.)
SKIP Config <NET-6> exit
Circuit Config <NET-6> exit
Config>protocol ip
Internet protocol user configuration
IP config>add address
Which net is this address for [0]? 6
New address [0.0.0.0]? 0.0.0.6
Is this interface a tunnel to a single SKIP PC or workstation(Yes or [No]): yes
IP config>add route
IP destination [0.0.0.0]?
Address mask [0.0.0.0]?
Via gateway at [0.0.0.0]? 0.0.0.1
Cost [1]?
Figure 18 VPN Between Two Routers With NAT on the Remote Router

By setting the outside and inside addresses to the same value, you essentially cause NAT to not translate this address.NAT Config>add fixed-ip-mappings
Public outside address [0.0.0.0]? 128.185.20.2
Mask [255.255.255.255]?
Private inside address [0.0.0.0]? 128.185.20.2