cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2196
Views
5
Helpful
8
Replies

Need site to site VPN to route subnet through alternate gateway.

azwatkins
Level 1
Level 1

Is it possible to route a specific subnet through a site-to-site vpn?  Example:

Remote office Cisco ASA 5505:  192.168.2.0\24

Corp office Cisco ASA 5510:  192.168.1.0\24

Datacenter 172.17.24.0\24

I need to be able to route all traffic to 172.17.24.0\24 through the Corp VPN and back to the remote site.

                   

ASA Version 8.2(1)

!

hostname Remote1

domain-name Domain

names

name 192.168.1.0 Corp

!

interface Vlan1

nameif inside

security-level 100

ip address 192.168.2.2 255.255.255.0

!

interface Vlan2

nameif outside

security-level 0

ip address 216.xxx.xxx.xxx255.255.255.248

!

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 Domain

access-list inside_access_in extended permit ip any any

access-list outside_1_cryptomap extended permit ip 192.168.2.0 255.255.255.0 Corp 255.255.255.0

access-list inside_nat0_outbound extended permit ip 192.168.2.0 255.255.255.0 Corp 255.255.255.0

access-list outside_nat0_outbound extended permit ip Corp 255.255.255.0 192.168.2.0 255.255.255.0

pager lines 24

logging asdm informational

mtu inside 1500

mtu outside 1500

no failover

icmp unreachable rate-limit 1 burst-size 1

icmp permit any inside

no asdm history enable

arp timeout 14400

global (outside) 1 interface

nat (inside) 0 access-list inside_nat0_outbound

nat (inside) 1 0.0.0.0 0.0.0.0

nat (outside) 0 access-list outside_nat0_outbound

access-group inside_access_in in interface inside control-plane

route outside 0.0.0.0 0.0.0.0 216.xxx.xxx.xxx 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

aaa authentication ssh console LOCAL

http server enable

http 0.0.0.0 0.0.0.0 inside

http 0.0.0.0 0.0.0.0 outside

http 192.168.2.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 ipsec transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac

crypto ipsec security-association lifetime seconds 28800

crypto ipsec security-association lifetime kilobytes 4608000

crypto map outside_map 1 match address outside_1_cryptomap

crypto map outside_map 1 set peer 184.xxx.xxx.xxx

crypto map outside_map 1 set transform-set ESP-3DES-SHA

crypto map outside_map interface outside

crypto isakmp enable inside

crypto isakmp enable outside

crypto isakmp policy 5

authentication pre-share

encryption 3des

hash sha

group 2

lifetime 86400

crypto isakmp policy 10

authentication pre-share

encryption des

hash sha

group 2

lifetime 86400

telnet timeout 5

ssh 0.0.0.0 0.0.0.0 inside

ssh 192.168.2.0 255.255.255.0 inside

ssh 0.0.0.0 0.0.0.0 outside

ssh timeout 5

console timeout 0

management-access inside

dhcpd auto_config outside

!

dhcpd address 192.168.2.20-192.168.2.200 inside

dhcpd dns 192.168.1.247 216.xxx.xxx.xxx interface inside

dhcpd lease 69100 interface inside

dhcpd domain Domain interface inside

dhcpd enable inside

!

threat-detection basic-threat

threat-detection statistics access-list

no threat-detection statistics tcp-intercept

webvpn

tunnel-group 184.xxx.xxx.xxxtype ipsec-l2l

tunnel-group 184.xxx.xxx.xxxipsec-attributes

pre-shared-key *

!

!

prompt hostname context

: end

Thank you for any help.

ASA Version 8.2(1)

!

hostname Remote1

domain-name Domain

names

name 192.168.1.0 Corp

!

interface Vlan1

nameif inside

security-level 100

ip address 192.168.2.2 255.255.255.0

!

interface Vlan2

nameif outside

security-level 0

ip address 216.xxx.xxx.xxx255.255.255.248

!

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 Domain

access-list inside_access_in extended permit ip any any

access-list outside_1_cryptomap extended permit ip 192.168.2.0 255.255.255.0 Corp 255.255.255.0

access-list inside_nat0_outbound extended permit ip 192.168.2.0 255.255.255.0 Corp 255.255.255.0

access-list outside_nat0_outbound extended permit ip Corp 255.255.255.0 192.168.2.0 255.255.255.0

pager lines 24

logging asdm informational

mtu inside 1500

mtu outside 1500

no failover

icmp unreachable rate-limit 1 burst-size 1

icmp permit any inside

no asdm history enable

arp timeout 14400

global (outside) 1 interface

nat (inside) 0 access-list inside_nat0_outbound

nat (inside) 1 0.0.0.0 0.0.0.0

nat (outside) 0 access-list outside_nat0_outbound

access-group inside_access_in in interface inside control-plane

route outside 0.0.0.0 0.0.0.0 216.xxx.xxx.xxx 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

aaa authentication ssh console LOCAL

http server enable

http 0.0.0.0 0.0.0.0 inside

http 0.0.0.0 0.0.0.0 outside

http 192.168.2.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 ipsec transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac

crypto ipsec security-association lifetime seconds 28800

crypto ipsec security-association lifetime kilobytes 4608000

crypto map outside_map 1 match address outside_1_cryptomap

crypto map outside_map 1 set peer 184.xxx.xxx.xxx

crypto map outside_map 1 set transform-set ESP-3DES-SHA

crypto map outside_map interface outside

crypto isakmp enable inside

crypto isakmp enable outside

crypto isakmp policy 5

authentication pre-share

encryption 3des

hash sha

group 2

lifetime 86400

crypto isakmp policy 10

authentication pre-share

encryption des

hash sha

group 2

lifetime 86400

telnet timeout 5

ssh 0.0.0.0 0.0.0.0 inside

ssh 192.168.2.0 255.255.255.0 inside

ssh 0.0.0.0 0.0.0.0 outside

ssh timeout 5

console timeout 0

management-access inside

dhcpd auto_config outside

!

dhcpd address 192.168.2.20-192.168.2.200 inside

dhcpd dns 192.168.1.247 216.xxx.xxx.xxx interface inside

dhcpd lease 69100 interface inside

dhcpd domain Domain interface inside

dhcpd enable inside

!

threat-detection basic-threat

threat-detection statistics access-list

no threat-detection statistics tcp-intercept

webvpn

tunnel-group 184.xxx.xxx.xxxtype ipsec-l2l

tunnel-group 184.xxx.xxx.xxxipsec-attributes

pre-shared-key *

!

!

prompt hostname context

: end

8 Replies 8

Hi,

May I know where the Datacenter is (behind which FW)?

Please clarify since I cannot find it in the configuration above.

Thanks.

Portu

Sent from Cisco Technical Support Android App

Sorry.  It is attached to the Corp site through a site-to-site vpn, but unavailable to the remote site directly by site-to-site vpn.

Hi Alex,

Thanks for the update.

Relevant configuration Remote office Cisco ASA 5505:  192.168.2.0\24:

name 192.168.1.0 Corp

!

access-list outside_1_cryptomap extended permit ip 192.168.2.0 255.255.255.0 Corp 255.255.255.0

access-list inside_nat0_outbound extended permit ip 192.168.2.0 255.255.255.0 Corp 255.255.255.0

!

nat (inside) 0 access-list inside_nat0_outbound

!

crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac

!

crypto map outside_map 1 match address outside_1_cryptomap

crypto map outside_map 1 set peer 184.xxx.xxx.xxx

crypto map outside_map 1 set transform-set ESP-3DES-SHA

crypto map outside_map interface outside

!

crypto isakmp enable outside

!

crypto isakmp policy 5

authentication pre-share

encryption 3des

hash sha

group 2

lifetime 86400

!

crypto isakmp policy 10

authentication pre-share

encryption des

hash sha

group 2

lifetime 86400

!

tunnel-group 184.xxx.xxx.xxxtype ipsec-l2l

tunnel-group 184.xxx.xxx.xxxipsec-attributes

pre-shared-key *

!

route outside 0.0.0.0 0.0.0.0 216.xxx.xxx.xxx 1

*****

It looks good to me, please share the configuration of the Corp site?

Thanks.

Portu

Please rate any helpful posts.

Message was edited by: Javier Portuguez

ASA Version 8.2(1)
!
hostname Corp
domain-name Domain
names
name 172.xxx.xxx.0 Datacenter
name 184.xxx.xxx.32 Datacenter_colo
name 192.168.2.0 Remote1
!
interface Ethernet0/0
nameif outside
security-level 0
ip address 184.xxx.xxx.34 255.255.255.240
!
interface Ethernet0/1
nameif inside
security-level 100
ip address 192.168.1.2 255.255.255.0
!
interface Ethernet0/2
no nameif
no security-level
no ip address
!
interface Ethernet0/3
no nameif
no security-level
no ip address
!
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 MST -7
dns domain-lookup outside
dns domain-lookup inside
dns domain-lookup management
dns server-group DefaultDNS
name-server srv01
domain-name Domain
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
access-list 23 standard permit any
access-list outside_1_cryptomap extended permit ip 192.168.1.0 255.255.255.0 Datacenter 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 Remote1 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 Datacenter 255.255.255.0
access-list outside_2_cryptomap extended permit ip 192.168.1.0 255.255.255.0 Datacenter 255.255.255.0
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq 2019
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq 3389
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq 2016
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 range 4005 4009
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq 4218
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq https
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq 8443
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq 4056
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq citrix-ica
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq 2027
access-list outside_access_in extended permit tcp any 184.xxx.xxx.32 255.255.255.240 eq www
access-list outside_access_in extended permit ip Datacenter_colo 255.255.255.224 any
access-list outside_4_cryptomap extended permit ip 192.168.1.0 255.255.255.0 Remote1 255.255.255.0
pager lines 24
logging enable
logging asdm warnings
mtu outside 1500
mtu inside 1500
mtu management 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1 0.0.0.0 0.0.0.0
static (inside,outside) tcp interface 3389 srv01 3389 netmask 255.255.255.255
static (inside,outside) tcp interface citrix-ica srv01 citrix-ica netmask 255.255.255.255
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 184.xxx.xxx.33 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
aaa-server Domain_Server protocol nt
aaa-server Domain_Server (inside) host srv01
nt-auth-domain-controller 192.168.1.247
aaa authentication ssh console LOCAL
aaa authentication telnet console LOCAL
aaa authentication enable console LOCAL
http server enable
http server idle-timeout 5
http server session-timeout 10
http 0.0.0.0 0.0.0.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
crypto ipsec transform-set ESP-DES-SHA esp-des esp-sha-hmac
crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto ipsec transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac
crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto ipsec transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
crypto ipsec transform-set ESP-AES-192-SHA esp-aes-192 esp-sha-hmac
crypto ipsec transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
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 dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
crypto map outside_map 1 match address outside_1_cryptomap
crypto map outside_map 1 set pfs group1
crypto map outside_map 1 set peer 184.xxx.xxx.34
crypto map outside_map 1 set transform-set ESP-3DES-MD5
crypto map outside_map 2 match address outside_2_cryptomap_1
crypto map outside_map 2 set pfs
crypto map outside_map 2 set peer 216.xxx.xxx.106
crypto map outside_map 2 set transform-set ESP-3DES-SHA
crypto map outside_map 3 match address outside_3_cryptomap
crypto map outside_map 3 set peer 184.xxx.xxx.101
crypto map outside_map 3 set transform-set ESP-3DES-SHA
crypto map outside_map 4 match address outside_4_cryptomap
crypto map outside_map 4 set peer 216.xxx.xxx.90
crypto map outside_map 4 set transform-set ESP-3DES-SHA
crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map outside_map interface outside
crypto isakmp enable outside
crypto isakmp policy 5
authentication pre-share
encryption 3des
hash sha
group 2
lifetime 86400
crypto isakmp policy 10
authentication pre-share
encryption des
hash sha
group 2
lifetime 86400
crypto isakmp policy 30
authentication pre-share
encryption 3des
hash md5
group 2
lifetime 86400
crypto isakmp policy 50
authentication pre-share
encryption 3des
hash md5
group 1
lifetime 86400
crypto isakmp policy 70
authentication pre-share
encryption 3des
hash sha
group 1
lifetime 86400
telnet timeout 5
ssh 0.0.0.0 0.0.0.0 inside
ssh 0.0.0.0 0.0.0.0 management
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
ssl server-version sslv3
ssl client-version sslv3-only
ssl encryption rc4-sha1 aes128-sha1 aes256-sha1 des-sha1
webvpn
enable outside
svc image disk0:/anyconnect-win-2.4.1012-k9.pkg 1 regex "Windows NT"
svc enable
group-policy DfltGrpPolicy attributes
vpn-tunnel-protocol IPSec l2tp-ipsec svc webvpn
service-type remote-access
webvpn
  url-list value Citrix_MB
webvpn
  url-list value Citrix_MB
tunnel-group 184.xxx.xxx.34 type ipsec-l2l
tunnel-group 184.xxx.xxx.34 ipsec-attributes
pre-shared-key *
tunnel-group 216.xxx.xxx.106 type ipsec-l2l
tunnel-group 216.xxx.xxx.106 ipsec-attributes
pre-shared-key *
tunnel-group 184.xxx.xxx.101 type ipsec-l2l
tunnel-group 184.xxx.xxx.101 ipsec-attributes
pre-shared-key *
tunnel-group 216.xxx.xxx.90 type ipsec-l2l
tunnel-group 216.xxx.xxx.90 ipsec-attributes
pre-shared-key *
tunnel-group NT_VPN type remote-access
tunnel-group NT_VPN general-attributes
authentication-server-group Domain_Server
dhcp-server srv01
tunnel-group NT_VPN webvpn-attributes
group-alias DOMAINVPN enable
!
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
: end

Dear Alex,

Relevant configuration:

access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 172.17.24.0 255.255.255.0

!

access-list outside_2_cryptomap extended permit ip 192.168.1.0 255.255.255.0 172.17.24.0 255.255.255.0

!

crypto map outside_map 2 match address outside_2_cryptomap_1

crypto map outside_map 2 set pfs

crypto map outside_map 2 set peer 216.xxx.xxx.106

crypto map outside_map 2 set transform-set ESP-3DES-SHA

!

crypto isakmp policy 5

authentication pre-share

encryption 3des

hash sha

group 2

lifetime 86400

!

crypto map outside_map interface outside

crypto isakmp enable outside

!

tunnel-group 216.xxx.xxx.106 type ipsec-l2l

tunnel-group 216.xxx.xxx.106 ipsec-attributes

pre-shared-key *

*******************

Recommended actions:

On Corp:

no crypto map outside_map 2 set pfs

On both:

Make sure the pre-shared-key is corect.

Troubleshooting steps:

Remote1

1- debug crypto isakmp 190

2- debug crypto ipsec 190

Let me know.

Portu.

Please rate any helpful posts.

First off Javier thank you for your help.

Recommended actions:

On Corp:

no crypto map outside_map 2 set pfs  (If I disable this then the connection between Corp and Datacenter goes down.)

On both:

Make sure the pre-shared-key is corect.  (This works since I am able to connect to either site from the other)

I am not sure I made myself clear.

Currently the site-to-site VPN is working between the Remote1 and Corp.  Also the site-to-site from Corp to the Datacenter is working correctly.  If I set DNS for Remote1 to the internal DNS at Corp I am unable to reach the server at the Datacenter by their internal IP's (172.17.24.0).  Since we have some servers at Corp and Datacenter I would like to be able to use the internal DNS.

Alex,

It is interesting, cause the configurations do not reflect PFS on both sites.

Now, can you ping by IP address from remote to the DNS server?

Packet-capture on remote host (behind Remote1), do you see the DNS answer?

Thanks.

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: