Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cisco PIX  VPN and NAT

Posted on 2008-06-25
14
Medium Priority
?
1,780 Views
Last Modified: 2013-11-16
Hi,

I need to have a VPN from a PIX506e and a remote private network
We will use NAT to map certains through the VPN

192.168.100.0/24----PIX506----internet----------------------remote FW------Private lan 172.16.1.0
we want to NAT 192.168.100.10 to be seen as 10.10.10.10 from the 172.16.1.0 LAN
The 192.168.100.0 network also need a NAT to go out on the internet

Any example ??
0
Comment
Question by:fox54
  • 7
  • 7
14 Comments
 
LVL 3

Expert Comment

by:AugustTen
ID: 21867170
Hi, NAT through the VPN is not different from any other NAT as long as you do a source NAT (meaning that you translate the source address from 192.168.100.0/24 to 10.10.10.10 on the PIX506). The translation will be done before encryption occurs, so you need the translated IP in the crypto map. Plenty of NAT examples on CCO.
0
 

Author Comment

by:fox54
ID: 21869044
If i do source nat before encryption occurs, it does not matter from where the connection is initiated ?
The 172.16.1.0 holds the client application and will initiate connection
0
 
LVL 3

Expert Comment

by:AugustTen
ID: 21872441
Correct, the clients can establish connections if you do a 1:1 NAT of the entire network. Here is an example:

access-list policy-nat extended permit ip 192.168.100.0 255.255.255.0 172.16.1.0 255.255.255.0

!--- The policy-nat ACL is used with the static
!--- command in order to match the VPN traffic for
!--- translation

static (inside,outside) 10.10.10.0  access-list policy-nat


global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0 0 0

!--- The above statements will PAT the internet traffic
!--- except the VPN traffic using the IP address from the
!--- interface

Then you use 10.10.10.0/24 in your crypto map statement.
0
Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.

 

Author Comment

by:fox54
ID: 21872634
If i am using policy NAT, i think that i won't be able to use the PDM again to configure the PIX.  The PIX supports policy-nat but not the PDM.  Am i right ??  Is there a way to continue to use the PDM like a newer version of the PDM or using another method than policy NAT ?
0
 
LVL 3

Expert Comment

by:AugustTen
ID: 21872680
No, you must use policy NAT for this, or no NAT.

I have no idea if the PDM supports it or not, sorry.
0
 

Author Comment

by:fox54
ID: 21873107
It's nor really a 1 to 1 NAT that i would need
i.e : I would like to NAT for example 192.168.100.10 to be NAT to 10.10.10.10  and 192.168.100.11 to be NAT to 10.10.10.33.
0
 
LVL 3

Expert Comment

by:AugustTen
ID: 21873432
Same thing, you need a static policy NAT.

Only if the hosts that you want to translate on the 192.168.100.10 network do not require internet access can you skip policy NAT.

0
 

Author Comment

by:fox54
ID: 21901767
I decided to test the solution in the lab with 1:1 NAT and a 192.168.8.0 network to simulate the Internet
So i used a pix506 to simulate the pix i want to configure ands a RV042 to simulate the other side of the tunnel (172.16.1.0) which i will have no control over.  I tried the solution and it did not work.   The onlly thing i succedded is the VPN with no nat (which is easy to do).  In the final solution, 192.168.100.0 will be seen as 10.10.10.0 from the 172.16.1.0 network
I presume the the other side of the VPN encrypt traffic from the 172.16.1.0 to the 10.10.10.0 because they won't see the 192.168.100.0 network

Here's the config with the vpn with no nat

PIX Version 6.3(4)
interface ethernet0 auto
interface ethernet1 auto
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pixfirewall
domain-name ciscopix.com
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
name 172.16.1.0 remote_net_no_nat
access-list inside_outbound_nat0_acl permit ip 192.168.100.0 255.255.255.0 remote_net_no_nat 255.255.255.0
access-list outside_cryptomap_20 permit ip 192.168.100.0 255.255.255.0 remote_net_no_nat 255.255.255.0
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside 192.168.8.230 255.255.255.0
ip address inside 192.168.100.254 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
pdm location 192.168.1.0 255.255.255.0 inside
pdm location remote_net_no_nat 255.255.255.0 outside
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_outbound_nat0_acl
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
route outside 0.0.0.0 0.0.0.0 192.168.8.1 1
timeout xlate 0:05:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server TACACS+ max-failed-attempts 3
aaa-server TACACS+ deadtime 10
aaa-server RADIUS protocol radius
aaa-server RADIUS max-failed-attempts 3
aaa-server RADIUS deadtime 10
aaa-server LOCAL protocol local
ntp server 192.43.244.18 source outside prefer
http server enable
http 192.168.1.0 255.255.255.0 inside
http 192.168.100.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto map outside_map 20 ipsec-isakmp
crypto map outside_map 20 match address outside_cryptomap_20
crypto map outside_map 20 set peer 192.168.8.241
crypto map outside_map 20 set transform-set ESP-3DES-MD5
crypto map outside_map interface outside
isakmp enable outside
isakmp key ******** address 192.168.8.241 netmask 255.255.255.255 no-xauth no-config-mode
isakmp identity address
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
telnet 192.168.100.0 255.255.255.0 inside
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd address 192.168.100.100-192.168.100.150 inside
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd auto_config outside
dhcpd enable inside
terminal width 80
0
 

Author Comment

by:fox54
ID: 21903178
Hi,
Okay i made it work.  The only thing is that there's no internet access from 192.168.100.0 anymore
Do i need another access-list to permit the traffic ??

PIX Version 6.3(4)
interface ethernet0 auto
interface ethernet1 auto
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pixfirewall
domain-name ciscopix.com
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
name 172.16.1.0 remote_net_no_nat
access-list outside_cryptomap_20 permit ip 10.10.10.0 255.255.255.0 remote_net_no_nat 255.255.255.0
access-list policy-nat permit ip 192.168.100.0 255.255.255.0 remote_net_no_nat 255.255.255.0
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside 192.168.8.230 255.255.255.0
ip address inside 192.168.100.254 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
pdm location 192.168.1.0 255.255.255.0 inside
pdm location remote_net_no_nat 255.255.255.0 outside
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) 10.10.10.0 access-list policy-nat 0 0
route outside 0.0.0.0 0.0.0.0 192.168.8.1 1
timeout xlate 0:05:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server TACACS+ max-failed-attempts 3
aaa-server TACACS+ deadtime 10
aaa-server RADIUS protocol radius
aaa-server RADIUS max-failed-attempts 3
aaa-server RADIUS deadtime 10
aaa-server LOCAL protocol local
ntp server 192.43.244.18 source outside prefer
http server enable
http 192.168.1.0 255.255.255.0 inside
http 192.168.100.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto map outside_map 20 ipsec-isakmp
crypto map outside_map 20 match address outside_cryptomap_20
crypto map outside_map 20 set peer 192.168.8.241
crypto map outside_map 20 set transform-set ESP-3DES-MD5
crypto map outside_map interface outside
isakmp enable outside
isakmp key allo1234 address 192.168.8.241 netmask 255.255.255.255 no-xauth no-config-mode
isakmp identity address
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
telnet 192.168.100.0 255.255.255.0 inside
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd address 192.168.100.100-192.168.100.150 inside
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd auto_config outside
dhcpd enable inside
terminal width 80

0
 
LVL 3

Expert Comment

by:AugustTen
ID: 21903202
Internet should work fine with this configuration. Does it work if the only change you make is to remove the static statement?
0
 

Author Comment

by:fox54
ID: 21903427
I found the problem.  My mistake. Works perfectly now

If i want to only a couple of separate host like 192.168.100.100 to 10.10.10.2 and 192.168.100.50  to 10.10.10.3, how would i change the static map
0
 
LVL 3

Accepted Solution

by:
AugustTen earned 1000 total points
ID: 21903465
You can change the source address in the access-list policy-nat to only match a host address, and add one static for each.
0
 

Author Comment

by:fox54
ID: 21903577
i made those entries:
access-list policy-nat permit ip host 192.168.100.100 remote_net_no_nat 255.255.255.0
access-list policy-nat1 permit ip host 192.168.100.101 remote_net_no_nat 255.255.255.0

to match

static (inside,outside) 10.10.10.2 access-list policy-nat 0 0
static (inside,outside) 10.10.10.3 access-list policy-nat1 0 0
0
 
LVL 3

Expert Comment

by:AugustTen
ID: 21903592
exactly
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Juniper VPN devices are a popular alternative to using Cisco products. Last year I needed to set up an international site-to-site VPN over the Internet, but the client had high security requirements -- FIPS 140. What and Why of FIPS 140 Federa…
If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question