cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8616
Views
0
Helpful
33
Replies

Allow only one host access to VPN site to site tunnel

ubergeek1
Level 1
Level 1

Hello,

I have a ASA 5510 that has multiple site to site VPNs. I need to create an additiona site to site VPN but only allow 1 host to access and traverse the tunnel. The network is on a 192.168.5.x but the host that will need to access this tunnel needs to be on a 172.16.33.x network. I dont want any other traffic allowed to access or traverse the VPN tunnel for this host.  How can I set this up? Any code examples would be great. Thanks

33 Replies 33

yup, looks good to me, except the crypto key should be configured under tunnel-group:

tunnel-group type ipsec-l2l

tunnel-group ipsec-attribute

   pre-shared-key

BTW, you've copied the crypto map section twice

LOL yup, getting late here and I am at a security con and had a few brews   I will let you know my results when I get back to the office. Thanks again I REALLY appreciate it!

No worries, have fun!!

Hi Jennifer,

I finally got a chance to work on this. I have the tunnel up if traffic is sent from the remote network, however if I try to send traffic from my internal lan to the remote network over the VPN the tunnel does not come up. I did notice one thing, I added the nat (inside) 5 172.18.13.x and a sh xlate showed that 192.168.5.40 was patted to this address, but then the nat statement disappeared. It could have happened when I deleted one of the acl's and reentered it. So the tunnel works but I cannot send any traffic, something is blocking me. Below is the current config:

ASA Version 8.2(1)
!
hostname xxxx
domain-name xxxxxxxxxxxxxxxxxxxxxx
enable password k4HlcGX2lC1ypFOm encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
!
interface Ethernet0/0
nameif outside
security-level 0
ip address 12.xxx.xxx.xx 255.255.255.xxx
!
interface Ethernet0/1
nameif inside
security-level 100
ip address 172.16.xxx.xxx 255.255.255.0
!
interface Ethernet0/2
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet0/3
nameif DMZ
security-level 50
ip address 192.168.75.1 255.255.255.0
!
interface Management0/0
nameif management
security-level 100
ip address 192.168.1.1 255.255.255.0
management-only
!
ftp mode passive
clock timezone EST -5
clock summer-time EDT recurring
dns server-group DefaultDNS
domain-name xxxxxxxxxxxxxxxxxxxxx
access-list outside_access_in remark Permit traffic from Internet to web server
access-list outside_access_in extended permit tcp any host 12.xxx.xxx.xx eq www
access-list outside_access_in extended permit udp any host 12.xxx.xxx.xx eq 5008
access-list DMZtoInside extended permit tcp host 192.168.75.5 host 192.168.5.15 eq 1433
access-list DMZtoInside extended permit tcp host 192.168.75.5 host 192.168.5.15 eq www
access-list DMZtoInside extended deny ip any 192.168.0.0 255.255.255.0 log
access-list DMZtoInside extended permit tcp host 192.168.75.5 host 192.168.5.14 eq 8080
access-list crypto-acl extended permit ip host 172.18.13.xx host 198.xx.xxx.xxx
access-list nat-to-remote extended permit ip host 192.168.5.40 host 198.xx.xxx.xxx
pager lines 24
logging enable
logging asdm informational
mtu outside 1500
mtu inside 1500
mtu DMZ 1500
mtu management 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
global (outside) 1 interface
global (outside) 5 172.18.13.xx
global (DMZ) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0
nat (DMZ) 1 0.0.0.0 0.0.0.0
nat (management) 1 0.0.0.0 0.0.0.0
static (DMZ,outside) tcp 12.xxx.xxx.xx www 192.168.75.5 www netmask 255.255.255.255
static (DMZ,outside) tcp 12.xxx.xxx.xx https 192.168.75.5 https netmask 255.255.255.255
static (inside,outside) udp 12.xxx.xxx.xx 5008 172.16.32.xxx 5008 netmask 255.255.255.255
static (inside,DMZ) 192.168.5.15 192.168.5.15 netmask 255.255.255.255
static (inside,DMZ) 192.168.5.14 192.168.5.14 netmask 255.255.255.255
access-group outside_access_in in interface outside
access-group DMZtoInside in interface DMZ
route outside 0.0.0.0 0.0.0.0 12.xxx.xxx.xx 1
route inside 172.16.32.0 255.255.255.0 172.16.85.253 1
route inside 192.168.5.14 255.255.255.255 172.16.85.253 1
route inside 192.168.5.15 255.255.255.255 172.16.85.253 1
route outside 198.xx.xxx.0 255.255.255.0 12.xxx.xxx.xx 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
timeout tcp-proxy-reassembly 0:01:00
dynamic-access-policy-record DfltAccessPolicy
http server enable
http 192.168.1.0 255.255.255.0 management
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 ipsec security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
crypto map outside_map 1 set peer 198.xx.xxx.xx
crypto map outside_map 1 set transform-set ESP-3DES-SHA
crypto map outside_map interface outside
crypto isakmp enable outside
crypto isakmp policy 10
authentication pre-share
encryption 3des
hash sha
group 2
lifetime 86400
telnet timeout 5
ssh timeout 5
console timeout 0
threat-detection basic-threat
threat-detection statistics port
threat-detection statistics protocol
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
tftp-server management 192.168.1.3 ASA5510_6182012
webvpn
group-policy DfltGrpPolicy attributes
tunnel-group 198.xx.xxx.xx type ipsec-l2l
tunnel-group 198.xx.xxx.xx 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:768046cea800ceb4700b9641a70cc380
: end
asdm location 192.168.5.0 255.255.255.0 inside
asdm location 172.18.13.xx 255.255.255.255 inside

no asdm history enable

If you want to initiate the tunnel from both end, then you need to configure static policy NAT instead.

Base on your latest config, here is to be added:

no global (outside) 5 172.18.13.xx

static (inside,outside) 172.18.13.xx access-list nat-to-remote

Then "clear xlate".

Thanks for the reply Jennifer.  I will add the lines you have posted. I will add back in nat (outside) 5 172.18.13.x as well.  Are these two lines correct from the latest config?

access-list crypto-acl extended permit ip host 172.18.13.xx host 198.xx.xxx.xxx

access-list nat-to-remote extended permit ip host 192.168.5.40 host 198.xx.xxx.xxx

I still cannot pass any traffic to the remote networ. I added the lines in as suggested. What else can I try?

No, you don't need "nat (outside) 5 172.18.13.x", that is incorrect command.

The only NAT statement you need is:

static (inside,outside) 172.18.13.xx access-list nat-to-remote

Pls share your latest config again if it still doesn't work after removing "nat (outside) 5 172.18.13.x", and "clear xlate"

I removed nat (outside) command last week and never put it back in. Still no connection to the remote network. Here is the latest config:

ASA Version 8.2(1)
!
hostname xxxx
domain-name xxxxxxxxxxxxxxxxxxxxxx
enable password k4HlcGX2lC1ypFOm encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
!
interface Ethernet0/0
nameif outside
security-level 0
ip address 12.xxx.xxx.xx 255.255.255.xxx
!
interface Ethernet0/1
nameif inside
security-level 100
ip address 172.16.xxx.xxx 255.255.255.0
!
interface Ethernet0/2
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet0/3
nameif DMZ
security-level 50
ip address 192.168.75.1 255.255.255.0
!
interface Management0/0
nameif management
security-level 100
ip address 192.168.1.1 255.255.255.0
management-only
!
ftp mode passive
clock timezone EST -5
clock summer-time EDT recurring
dns server-group DefaultDNS
domain-name xxxxxxxxxxxxxxxxxxxxx
access-list outside_access_in remark Permit traffic from Internet to web server
access-list outside_access_in extended permit tcp any host 12.xxx.xxx.xx eq www
access-list outside_access_in extended permit udp any host 12.xxx.xxx.xx eq 5008
access-list DMZtoInside extended permit tcp host 192.168.75.5 host 192.168.5.15 eq 1433
access-list DMZtoInside extended permit tcp host 192.168.75.5 host 192.168.5.15 eq www
access-list DMZtoInside extended deny ip any 192.168.0.0 255.255.255.0 log
access-list DMZtoInside extended permit tcp host 192.168.75.5 host 192.168.5.14 eq 8080
access-list crypto-acl extended permit ip host 172.18.13.34 host 198.xx.xxx.0
access-list nat-to-remote extended permit ip host 192.168.5.40 host 198.xx.xxx.0
pager lines 24
logging enable
logging asdm informational
mtu outside 1500
mtu inside 1500
mtu DMZ 1500
mtu management 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
global (outside) 1 interface

global (DMZ) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0
nat (DMZ) 1 0.0.0.0 0.0.0.0
nat (management) 1 0.0.0.0 0.0.0.0
static (DMZ,outside) tcp 12.xxx.xxx.xx www 192.168.75.5 www netmask 255.255.255.255
static (DMZ,outside) tcp 12.xxx.xxx.xx https 192.168.75.5 https netmask 255.255.255.255
static (inside,outside) udp 12.xxx.xxx.xx 5008 172.16.32.xxx 5008 netmask 255.255.255.255
static (inside,DMZ) 192.168.5.15 192.168.5.15 netmask 255.255.255.255
static (inside,DMZ) 192.168.5.14 192.168.5.14 netmask 255.255.255.255
access-group outside_access_in in interface outside
access-group DMZtoInside in interface DMZ
route outside 0.0.0.0 0.0.0.0 12.xxx.xxx.xx 1
route inside 172.16.32.0 255.255.255.0 172.16.85.253 1
route inside 192.168.5.14 255.255.255.255 172.16.85.253 1
route inside 192.168.5.15 255.255.255.255 172.16.85.253 1
route outside 198.xx.xxx.0 255.255.255.0 12.xxx.xxx.xx 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
timeout tcp-proxy-reassembly 0:01:00
dynamic-access-policy-record DfltAccessPolicy
http server enable
http 192.168.1.0 255.255.255.0 management
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 ipsec security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
crypto map outside_map 1 set peer 198.xx.xxx.26
crypto map outside_map 1 set transform-set ESP-3DES-SHA
crypto map outside_map interface outside
crypto isakmp enable outside
crypto isakmp policy 10
authentication pre-share
encryption 3des
hash sha
group 2
lifetime 86400
telnet timeout 5
ssh timeout 5
console timeout 0
threat-detection basic-threat
threat-detection statistics port
threat-detection statistics protocol
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
tftp-server management 192.168.1.3 ASA5510_6182012
webvpn
group-policy DfltGrpPolicy attributes
tunnel-group 198.xx.xxx.26 type ipsec-l2l
tunnel-group 198.xx.xxx.26 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:768046cea800ceb4700b9641a70cc380
: end
asdm location 192.168.5.0 255.255.255.0 inside
asdm location 172.18.13.xx 255.255.255.255 inside

no asdm history enable

I just noticed that crypto map match address statement was missing. I added it in with the nat-to-remote acl but I still cannot get the tunnel up from my side and cannot pass traffic. When I do a sh access-list the counters are zero. I am at wits end

Did you configure this:

crypto map outside_map 1 match address crypto-acl

Also, i don't see your static policy NAT statement;

static (inside,outside) 172.18.13.xx access-list nat-to-remote

Ohhhh, and just realise, where do you actually try to send the traffic ffrom?

I don't see any route inside for the ip address in your static NAT acl: 192.168.5.40.

I think it would be best if you advise me your requirement again, ie: which subnet are you trying to send the traffic from, and what are you trying to NAT to, and what is the destination subnet.

Hi Jennifer,

Thanks so much for helping me out. I did add the crypto map outside_map 1 match address crypto-acl as well as the

static (inside,outside) 172.18.13.xx access-list nat-to-remote command. Now I dont have a route inside for the ip address in your static NAT acl: 192.168.5.40. (culprit?)

Here is the business requirement:  I have a workstation that needs to access a server on a remote network and the workstation IP is 192.168.5.40. The network people on the remote network need to the traffic to come to the remote network as a 172.18.13.34 address, hence the nat requirement. The subnet I am trying to send traffic from (before nat) is 192.168.5.0 and Ineed to nat the 192.168.5.40 host to 172.18.13.34. The destination subnet is a public one at 198.xxx.xxx.26.

Yup, you would need the route inside command, otherwise, it won't know how to route the traffic back.

route inside 192.168.5.40 255.255.255.255 172.16.85.253

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card