Solved

Cisco ASA site to site VPN with NAT

Posted on 2009-07-05
11
2,211 Views
Last Modified: 2012-05-07
Hi, I know this I am sure has been asked a dozen times and I have found what looks like what I want but have been unable to make it work so I am just going to put on here what someone asked me to do. First off I am very new to Cisco equipment I got the ASA setup and working but then they want this and I am not sure how to do it exactly. Here is what  they asked.

Our endpoint is: their outside IP
Our network is: 192.168.50.0 (255.255.255.0)

will need to make ACL from A.A.A.10  to hosts192.168.50.83, 192.168.50.86, 192.168.50.50, and 192.168.50.85

clinic will need to NAT interesting traffic to A.A.A.A 255.255.255.0  

Phase 1

Authentication: Pre-Shared
Encryption: 3DES
Hash: SHA
DH: 1
Lifetime: 86400 sec
Pre-shared Key: Big key

Phase2
ESP encryption 3DES
ESP authentication
Lifetime 28800


I think they left off something with the ESP authentication but I dont know. The internal network  is 192.168.150.0/24
Thanks for all the help!
Jarrid Graham
0
Comment
Question by:jarridgraham
  • 6
  • 5
11 Comments
 
LVL 13

Expert Comment

by:3nerds
Comment Utility
Jarrid,

Here is a great document to help explain the pieces need to get what you want to do working.

http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a00807f9a89.shtml

With that said. What device is on the other end of the tunnel? And if you care to share your configs we can look through them together.

Regards,

3nerds
0
 

Author Comment

by:jarridgraham
Comment Utility
    OK here is the config so far. If I set up the lan to lan VPN without screwing with the NAT. I can go to another machine  and try to ping the network and I see the tunnel start to come up, gets by Phase 1 but has a Phase 2 problem. something about Invalid ID Info (18). I am not sure what that refers to. When I mess with the NAT and change the VPN settings it never tries any more.
    I have no idea what hardware is on the other end, all I am told is it is set up right as uasual, we have done this a million times kind of stuff. Last time I spent a week working on a simple VPN setup that I could not get to work and found out they had a IP config error on their end.
    Should the VPN come up without the NAT but not be able to pass traffic or will that have an effect on the VPN where it just fails at the Phase2 point.

Thanks

: Saved
:
ASA Version 7.2(4)
!
hostname ciscoasa
domain-name default.domain.invalid
enable password  encrypted
passwd  encrypted
names
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 192.168.150.1 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address myoutoutsideIP 255.255.255.252
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
!
ftp mode passive
dns server-group DefaultDNS
 domain-name default.domain.invalid
access-list outside_access_in extended permit icmp any any
access-list outside_access_in extended permit ip any any
access-list VPN1 extended permit ip A.A.A.A 255.255.255.0 192.168.50.0 255.255.255.0
access-list INSIDE_nat_static extended permit ip 192.168.150.0 255.255.255.0 192.168.50.0 255.255.255.0
access-list outside_1_cryptomap extended permit ip A.A.A.A 255.255.255.0 192.168.50.0 255.255.255.0
access-list inside_access_in extended permit ip any any
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-524.bin
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0
static (inside,outside) tcp interface 3389 192.168.150.10 3389 netmask 255.255.255.255
static (inside,outside) A.A.A.A  access-list INSIDE_nat_static
access-group inside_access_in in interface inside
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 74.42.77.181 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
http server enable 500
http 0.0.0.0 0.0.0.0 outside
http 192.168.150.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto dynamic-map outside_dyn_map 20 set pfs group1
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-SHA
crypto map outside_map 1 match address outside_1_cryptomap
crypto map outside_map 1 set peer TheiroutsideIP
crypto map outside_map 1 set transform-set ESP-3DES-SHA
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
crypto map outside_map interface outside
crypto isakmp enable outside
crypto isakmp policy 10
 authentication pre-share
 encryption 3des
 hash sha
 group 1
 lifetime 86400
telnet timeout 5
ssh 0.0.0.0 0.0.0.0 outside
ssh timeout 5
console timeout 0
dhcpd auto_config outside
!
dhcpd address 192.168.150.2-192.168.150.33 inside
!


tunnel-group TheiroutsideIP type ipsec-l2l
tunnel-group TheiroutsideIP ipsec-attributes
 pre-shared-key *
!
class-map inspection_default
 match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
 parameters
  message-length maximum 512
policy-map global_policy
 class inspection_default
  inspect dns preset_dns_map
  inspect ftp
  inspect h323 h225
  inspect h323 ras
  inspect rsh
  inspect rtsp
  inspect esmtp
  inspect sqlnet
  inspect skinny
  inspect sunrpc
  inspect xdmcp
  inspect sip
  inspect netbios
  inspect tftp
!
service-policy global_policy global
prompt hostname context
Cryptochecksum:1daf32a1c55babc159443857e391e614
: end
asdm image disk0:/asdm-524.bin
no asdm history enable


0
 
LVL 13

Expert Comment

by:3nerds
Comment Utility
Without NAT the VPN will come up because of this rule:
access-list outside_1_cryptomap extended permit ip A.A.A.A 255.255.255.0 192.168.50.0 255.255.255.0

but traffic will not pass without the no noat.

You have this:

nat (inside) 1 0.0.0.0 0.0.0.0

but you need to create a nonat acl and then add this:

nat (inside) 0 access-list nonat

Log into the asdm and make sure logging is turned on an post the errors for further help. As until you get phase 2 corrected you will be dead in the water.

Regards,

3nerds

0
 

Author Comment

by:jarridgraham
Comment Utility
OK, I just cleaned it up and just went with a stright VPN connection here is the error log. I suspect they may have something wrong on their end but I have to be able to prove it.
error.log
0
 
LVL 13

Expert Comment

by:3nerds
Comment Utility
access-list outside_1_cryptomap extended permit ip A.A.A.A 255.255.255.0 192.168.50.0 255.255.255.0

Please confirm the subnets on this crypto acl.

A.A.A.A should be your local subnet which appears to be 192.168.150.0
192.168.50.0 should be the other side

Let me know what is where.

Regards,

3nerds
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:jarridgraham
Comment Utility
Yes there is a line like that, I would guess that is how it decides on that to build the VPN for. I just wonder if the VPN should come up with out the NAT magic or if they may have something wrong on their end  with that Phase 2 error.
0
 
LVL 13

Expert Comment

by:3nerds
Comment Utility
The error you gave me means one end has a problem with there crypto acl.

What is the remote subnet and mask??
What is the local subnet and mask?

Regards,

3nerds
0
 

Author Comment

by:jarridgraham
Comment Utility
OK I must be thinking about this all wrong.  OK here is what I want to do, my local network is 192.168.150.0/24 and their local is 192.168.50.0/24 and they want me to NAT my traffic so it looks like is comes from lets say 192.168.160.0/24. I guess what I dont get is how to even know if the NAT statements actually are doing anything.
Thanks
0
 
LVL 13

Expert Comment

by:3nerds
Comment Utility
my local network is 192.168.150.0/24 and their local is 192.168.50.0/24 and they want me to NAT my traffic so it looks like is comes from lets say 192.168.160.0/24 --> no clue how you would accomplish that. I can help you make the vpn work but a vpn is per-nat so no clue how that would ever work. If you want to close this question and start another I have no objections.

Regards,

3nerds
0
 

Author Comment

by:jarridgraham
Comment Utility
Well maybe you can still help, I did get the NAT stuff to do what I want but I still have the same error but for some reason there is a lot more debug info that I am attaching.
error2.log
0
 
LVL 13

Accepted Solution

by:
3nerds earned 500 total points
Comment Utility
Your phase 2 still isn't coming up. What is and is not working?

3nerds
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
I found an issue or “bug” in the SonicOS platform (the firmware controlling SonicWALL security appliances) that has to do with renaming Default Service Objects, which then causes a portion of the system to become uncontrollable and unstable. BACK…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now