cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1673
Views
0
Helpful
23
Replies

ASA 5510 and Hairpinning (full tunnel)

seth
Level 1
Level 1

Hello all,
I have a VPN Remote Access configuration setup for my iPhone
I am doing full tunnel on this.
So it works, I can connect and get the tunnel up.
Now the problem that comes is that it seems that any kind of DNS lookup and then traffic flow to the website is not allowed.
I set the tunnel up to use my internal DNS server, didn't work.
I set it up to use Google's DNS servers, didn't work.

But traffic flow is working, because certain apps like WeChat or iMessage work with the tunnel enabled.
So I am assuming that they are hard coded with IP addresses in the programming of their app.
But if you go to Safari or Chrome and try to browse to amazon or google, then it doesn't work.

So what am I missing in my config?
for the Dynamic NAT rule I have for my iPhone VPN Pool, should I select the DNS Rewrite option on that rule?

23 Replies 23

Hi,

would it be an option to install the Cisco AnyConnect client ? I just wonder if the behavior is the same...

This guy here seems to have figured out his problem, but I am not using a .local domain, so that isn't my problem.

https://discussions.apple.com/thread/2643177?start=0&tstart=0

Finally got it figured out.
So iPhone is working as it should be.
As well as a MacBook Air

Fantastic ! How did you get it to work ? Was it a client or an ASA issue ?

When I was monitoring the logs on the ASDM Gui, I totally missed that it wasn't using the right Group Policy....I'm an idiot.
So I prolly had it working fine last week, if I had noticed that one thing.

If need be I can post the config

Great.By all means, post the config !

Here is my sanitized config, that is working
Bolded what I missed last week.


: Saved
: Written by enable_15 at 08:43:12.165 EDT Mon Oct 31 2016
!
ASA Version 8.2(3)
!
hostname CoxASA5510
domain-name My_Domain
enable password ..Lyz3sh0DbVWcxP encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
name 10.78.0.0 Cox_Inside description Inside network behind ASA5510
name 172.16.1.0 RemoteVPN description Remote Access Network
name 192.168.1.0 VPNMobile description IP Pool for VPN Mobile
!
interface Ethernet0/0
 nameif Outside
 security-level 0
 ip address x.x.x.x 255.255.255.128
!
interface Ethernet0/1
 shutdown
 no nameif
 no security-level
 no ip address
!
interface Ethernet0/2
 shutdown
 no nameif
 no security-level
 no ip address
!
interface Ethernet0/3
 shutdown
 no nameif
 no security-level
 no ip address
!
interface Management0/0
 nameif management
 security-level 100
 ip address 10.81.1.80 255.255.255.0
 management-only
!
interface GigabitEthernet1/0
 nameif Inside
 security-level 100
 ip address 10.78.0.1 255.255.255.0
!
interface GigabitEthernet1/1
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/2
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/3
 shutdown
 no nameif
 no security-level
 no ip address
!
boot system disk0:/asa823-k8.bin
ftp mode passive
clock timezone EST -5
clock summer-time EDT recurring
dns domain-lookup Outside
dns domain-lookup Inside
dns server-group DefaultDNS
 name-server 8.8.8.8
 name-server 8.8.4.4
 domain-name My_Domain
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface

access-list Inside_nat0_outbound extended permit ip Cox_Inside 255.255.255.0 VPNMobile 255.255.255.0
access-list Outside_access_in extended permit ip VPNMobile 255.255.255.0 any
access-list Outside_access_in extended permit ip any VPNMobile 255.255.255.0
access-list Outside_nat0_outbound extended permit ip VPNMobile 255.255.255.0 object-group DomainControllers
access-list Outside_cryptomap_5000 extended permit ip any VPNMobile 255.255.255.0
access-list Inside_access_in extended permit ip any any
pager lines 24
logging enable
logging asdm informational
mtu Outside 1500
mtu management 1500
mtu Inside 1500
ip local pool VPNDHCP2 172.16.1.100-172.16.1.200 mask 255.255.255.0
ip local pool VPNMobile 192.168.1.100-192.168.1.105 mask 255.255.255.0
no failover
icmp unreachable rate-limit 1 burst-size 1
icmp permit host 98.183.147.48 Outside
icmp permit host 216.54.104.130 Outside
icmp permit host 107.77.160.23 Outside
icmp permit any Inside
asdm location VPNMobile 255.255.255.0 management
no asdm history enable
arp timeout 14400
nat-control
global (Outside) 10 interface
nat (Outside) 0 access-list Outside_nat0_outbound
nat (Outside) 10 VPNMobile 255.255.255.0
nat (Inside) 0 access-list Inside_nat0_outbound
nat (Inside) 10 0.0.0.0 0.0.0.0
access-group Outside_access_in in interface Outside
access-group Inside_access_in in interface Inside
route Outside 0.0.0.0 0.0.0.0 x.x.x.x 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 AD_Server protocol nt
aaa-server AD_Server (Inside) host 10.78.0.6
 nt-auth-domain-controller Fserver3
aaa-server AD_LDAP protocol ldap
aaa-server AD_LDAP (Inside) host 10.78.0.6
 ldap-base-dn dc=my_domain, dc=com
 ldap-scope subtree
 ldap-naming-attribute sAMAccountName
 ldap-login-password xxxxxxx
 ldap-login-dn cn=administrator, cn=users, dc=my_domain, dc=com
 server-type microsoft
http server enable
http 10.81.1.0 255.255.255.0 management
http Cox_Inside 255.255.255.0 Inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
sysopt connection tcpmss 0
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-3DES-MD5 esp-3des esp-md5-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-AES-256-SHA esp-aes-256 esp-sha-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 match address Outside_cryptomap_65535.65535
crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set transform-set ESP-AES-256-SHA
crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set reverse-route
crypto dynamic-map iPhone 50000 match address Outside_cryptomap_5000
crypto dynamic-map iPhone 50000 set transform-set ESP-AES-256-SHA ESP-3DES-SHA
crypto dynamic-map iPhone 50000 set reverse-route
crypto map Outside_map 1 match address Outside_1_cryptomap
crypto map Outside_map 1 set peer x.x.x.x
crypto map Outside_map 1 set transform-set ESP-AES-256-SHA
crypto map Outside_map 2 match address Outside_2_cryptomap
crypto map Outside_map 2 set peer x.x.x.x
crypto map Outside_map 2 set transform-set ESP-AES-256-SHA
crypto map Outside_map 3 match address Outside_cryptomap
crypto map Outside_map 3 set peer x.x.x.x
crypto map Outside_map 3 set transform-set ESP-AES-256-SHA
crypto map Outside_map 10 match address Outside_cryptomap_10
crypto map Outside_map 10 set peer x.x.x.x
crypto map Outside_map 10 set transform-set ESP-AES-256-SHA
crypto map Outside_map 50000 ipsec-isakmp dynamic iPhone
crypto map Outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map Outside_map interface Outside
crypto isakmp enable Outside
crypto isakmp enable management
crypto isakmp enable Inside
crypto isakmp policy 20
 authentication pre-share
 encryption aes-256
 hash sha
 group 2
 lifetime 86400
crypto isakmp policy 30
 authentication pre-share
 encryption aes-256
 hash sha
 group 5
 lifetime 86400
crypto isakmp policy 40
 authentication pre-share
 encryption des
 hash md5
 group 2
 lifetime 86400
crypto isakmp policy 60
 authentication pre-share
 encryption 3des
 hash sha
 group 2
 lifetime 86400
crypto isakmp nat-traversal 45
vpn-addr-assign local reuse-delay 10
telnet timeout 5
ssh timeout 5
console timeout 0
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
ntp server 130.126.24.44 source management prefer
tftp-server Inside 10.78.0.5 ASA
webvpn
group-policy VPNCox internal
group-policy VPNCox attributes
 wins-server value 10.78.0.6
 dns-server value 10.78.0.6 10.78.0.5
 vpn-tunnel-protocol IPSec
 split-tunnel-policy tunnelspecified
 split-tunnel-network-list value VPNCox_splitTunnelAcl
 default-domain value My_Domain
group-policy iPhone internal
group-policy iPhone attributes
 dns-server value 8.8.8.8 8.8.4.4
 vpn-tunnel-protocol IPSec l2tp-ipsec
 split-tunnel-policy tunnelall
 default-domain value My_Domain
tunnel-group x.x.x.x type ipsec-l2l
tunnel-group x.x.x.x ipsec-attributes
 pre-shared-key xxxxxx
tunnel-group VPNCox type remote-access
tunnel-group VPNCox general-attributes
 address-pool VPNDHCP2
 authentication-server-group AD_LDAP LOCAL
 default-group-policy VPNCox
tunnel-group VPNCox ipsec-attributes
 pre-shared-key xxxxxxx
tunnel-group iPhone type remote-access
tunnel-group iPhone general-attributes
 address-pool VPNMobile
 default-group-policy iPhone
tunnel-group iPhone ipsec-attributes
 pre-shared-key xxxxxxxx
!
class-map inspection_default
 match default-inspection-traffic
!
!
policy-map type inspect dns MY_DNS_INSPECT_MAP
 parameters
  message-length maximum 512
policy-map global_policy
 class inspection_default
  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
  inspect dns MY_DNS_INSPECT_MAP
  inspect icmp
policy-map type inspect dns migrated_dns_map_1
 parameters
  message-length maximum 512
!
service-policy global_policy global

Good stuff ! I'll save that one for future reference !

Thanks for taking the time to look and give some input.

I appreciate it.