cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

415
Views
0
Helpful
14
Replies
Chieu Dinh
Beginner

NAT setup

I have setup the NAT to run site-to-site IPsec tunnel, but it seem my NAT is not working properly. Would you give me some help on troubleshoot this please. I could not find any hits on my NAT. Thank you

show run
: Saved
:
ASA Version 8.2(1)
!
hostname xxxxxxxxxxx
domain-name xxxxxxxxxxxx
enable password xaFrdhoWkLR6XPWW encrypted
passwd w15Y7V2V.K5Fe5eB encrypted
names
dns-guard
!
interface GigabitEthernet0/0
nameif outside
security-level 0
ip address 172.16.0.1 255.255.0.0
!
interface GigabitEthernet0/1
nameif inside
security-level 100
ip address 192.168.16.10 255.255.255.0
!
interface GigabitEthernet0/2
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet0/3
shutdown
no nameif
no security-level
no ip address
!
interface Management0/0
shutdown
nameif management
security-level 100
ip address 192.168.1.1 255.255.255.0
management-only
!
ftp mode passive
clock timezone PST -8
clock summer-time PDT recurring
dns server-group DefaultDNS
domain-name tensorcom.tw
access-list inside_nat0_outbound extended permit ip any 192.168.16.128 255.255.255.128
access-list inside_nat0_outbound extended permit ip 192.168.16.0 255.255.255.0 192.168.16.128

255.255.255.128
pager lines 24
logging asdm informational

mtu outside 1500
mtu inside 1500
mtu management 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-621.bin
no asdm history enable
arp timeout 14400
nat (outside) 0 0.0.0.0 0.0.0.0
nat (inside) 0 access-list inside_nat0_outbound
route outside 0.0.0.0 0.0.0.0 172.16.0.1 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.16.0 255.255.255.0 inside
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 security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
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 timeout 5
console timeout 0
dhcpd lease 3000
dhcpd ping_timeout 20
dhcpd domain tensorcom.tw
!
dhcpd address 192.168.16.50-192.168.16.100 inside
dhcpd enable inside

!
dhcpd address 192.168.1.2-192.168.1.254 management
dhcpd enable management
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
webvpn
username admin password lGrKKX6TeYxVhF3a encrypted
!
class-map inspection_default
match default-inspection-traffic
!
!
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
!
service-policy global_policy global
prompt hostname context
Cryptochecksum:c772cce72d0ad56e21ae5963cb8218eb

14 REPLIES 14
Jouni Forss
Mentor

Hi,

I cant see any VPN connection configurations in the above configuration you posted?

- Jouni

Thank you for response. I am doing the NAT first before I can setup the VPN. I think I am doing something wrong with NAT

Hi,

Its just that you dont mention the VPN networks and there is no visible VPN configuration so we cant confirm that the NAT configuration is correct

Though I have to say that your NAT0 ACL looks a bit off.

access-list inside_nat0_outbound extended permit ip any 192.168.16.128 255.255.255.128

access-list inside_nat0_outbound extended permit ip 192.168.16.0 255.255.255.0 192.168.16.128 255.255.255.128

First off I would suggest not using "any" in the ACL

And the second thing is the fact that your source network is 192.168.16.0/24 and your destination network 192.168.16.0/25. These obviously overlap and any traffic destined from network 192.168.16.0/24 will NEVER reach 192.168.16.0/25 since the source network will thiks its connecting to a host directly on its own network. In other words traffic will never reach the ASA from the source LAN but the source host will rather ARP and try to determine the MAC address of the destination host and connection will fail.

If the remote network is truly 192.168.16.0/25 then both sites have to do NAT to mask your actual LAN networks.

- Jouni

I just learned more about this NAT setup. Should my NAT should be this simple:

nat (inside) 1 192.168.16.0 255.255.255.0

global (outside) 1 interface

object network inside-net

subnet 192.168.16.0 255.255.255.0

nat (inside, outside) dynamic interface

I will remove all the access list.

access-list inside_nat0_outbound extended permit ip any 192.168.16.128 255.255.255.128

access-list inside_nat0_outbound extended permit ip 192.168.16.0 255.255.255.0 192.168.16.128 255.255.255.128

Hi,

If you mean that you want to configure basic Dynamic PAT for your LAN users then you need these

global (outside) 1 interface

nat (inside) 1 192.168.16.0 255.255.255.0

The above should handle the basic Dynamic PAT for Internet traffic..

You can remove this

no nat (outside) 0 0.0.0.0 0.0.0.0

- Jouni

Also,

There is something wrong with your default route configuration

route outside 0.0.0.0 0.0.0.0 172.16.0.1 1

The route is pointing to the ASA itself. It should be pointing towards the upstream routers gateway interface IP address

- Jouni

Hi Jouni

I have made the change and add VPN. can I send my config to you to take a look please?

Hi,

I guess I can take a look.

But have you tested your configurations?

How are you setting up the VPN when you seem to have a private IP address on the "outside" of the ASA? Are you doing NAT on a device infront of the ASA to give the ASA an public IP address?

- Jouni

The configurations seem fine to me on first glance.

The NAT configuration and the ACL used for the L2L VPN seem to match so it looks fine.

If the L2L VPN configurations are done on the other end too then you can actually test on the ASA itself if the L2L VPN connection comes up.

You can use the "packet-tracer" command

packet-tracer input inside tcp 192.168.16.100 12345 192.168.25.100 3389

Dont care about the IP addresses and ports used in the command. They dont really matter. The important thing is just that we generate a packet that matches the L2L VPN configurations and we can see what the result is.

Issue the above command TWICE on the ASA CLI. Then copy/paste the SECOND output here.

- Jouni

I am still testing locally until I setup in production. Therefore It is still private IP.

I ran the packet-tracer

Phase: 1
Type: FLOW-LOOKUP
Subtype:
Result: ALLOW
Config:
Additional Information:
Found no matching flow, creating a new flow

Result:
input-interface: inside
input-status: up
input-line-status: up
Action: drop

Phase: 1
Type: FLOW-LOOKUP
Subtype:
Result: ALLOW
Config:
Additional Information:
Found no matching flow, creating a new flow

Result:
input-interface: inside
input-status: up
input-line-status: up
Action: drop
Drop-reason: (no-route) No route to host


Drop-reason: (no-route) No route to host

Hi,

Seems you are still missing the route from your configuration.

You need a default route configured on the ASA that points to a gateway.

If you have not connected this device to Internet at all then we cant really confirm if the L2L VPN configuration works as the ASA cant negotiate the VPN connection up.

- Jouni

I agreed. I think I need the route. Let me double check.

I just add my route inside to gateway

route outside 0.0.0.0 255.255.255.0 67.111.118.156 1

Hi,

I am not sure what route that is

If you are going to configure default route then it needs to be

route outside 0.0.0.0 0.0.0.0

- Jouni