Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Step-by-Step Configuration and Troubleshooting Best Practices for the NGFW, NGIPS and AMP Technologies A Visual Guide to the Cisco Firepower Threat Defense (FTD)
Community Member

ASA 8.4 NAT not working

Could someone explain why my ASA config does not work? My config is attached in a txt file.

I tried to forward port 25 and 110 from the outside to the inside server, but I can't connect...

I starting to get gray on this issue...

      

Everyone's tags (3)
36 REPLIES
Red

ASA 8.4 NAT not working

Hi Tim,

You need to apply the access-group:

access-group outside_access_in in interface outside

It should work after that.

Thanks,
Varun Rao
Security Team,
Cisco TAC

Thanks, Varun Rao Security Team, Cisco TAC
Community Member

Re: ASA 8.4 NAT not working

Thanks for your response!           

I really start to doubt my ISP, because I can still not connect to the site with a:

telnet *wanIP* 110

No reponse

I can ping the local server (192.168.1.10) from the ASA CLI...

Community Member

Re: ASA 8.4 NAT not working

ISP answered that all ports are open and usable...I'm confused now...

VIP Purple

Re: ASA 8.4 NAT not working

in your original config are wrong objects. You define the object as server1_pop3, but configure NAT for server1_https:

object network server1_pop3

  host 192.168.1.10

object network server1_https

  nat (inside,outside) static interface service tcp pop3 pop3

After correcting that (and following Varuns advice for applying the ACL) it really should work.

Community Member

Re: ASA 8.4 NAT not working

I'm so sorry, but it still doesn't work. Here is my running config after applying the changes:

WAN IP:               95.*.*.218 255.255.255.248

ASA IP:               192.168.1.253 /24

Smtp / Pop IP:     192.168.1.10 /24

I can ping 192.168.1.10 from the ASA CLI. I can Ping DNS 4.2.2.2 from the CLI. I can Telnet the server from the inside LAN, using: telnet 192.168.1.10 110.

But I can't Telnet from an outside location using: Telnet 95.*.*.218 110           

ASA Version 8.4(3)
!
hostname ciscoasa
enable password cE8CBbDs encrypted
passwd 2KFQnbN encrypted
names
!
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
!
interface Vlan1
nameif inside
security-level 100
ip address 192.168.1.253 255.255.255.0
!
interface Vlan2
nameif outside
security-level 0
ip address 95.*.*.218 255.255.255.248
!
ftp mode passive
object network obj_any
subnet 0.0.0.0 0.0.0.0
object network server1_smtp
host 192.168.1.10
object network server1_pop3
host 192.168.1.10
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq smtp
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq pop3
pager lines 24
logging asdm informational
mtu inside 1500
mtu outside 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
!
object network obj_any
nat (inside,outside) dynamic interface
object network server1_smtp
nat (inside,outside) static interface service tcp smtp smtp
object network server1_pop3
nat (inside,outside) static interface service tcp pop3 pop3
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 95.*.*.217 1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
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
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
client-update enable
telnet timeout 5
ssh timeout 5
console timeout 0

dhcpd auto_config outside
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
webvpn
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
  message-length maximum client auto
  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
  inspect ip-options
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
Cryptochecksum:45efca6ddb136bc3aa7be64e0e733608

Red

ASA 8.4 NAT not working

Hi Tim,

Can you please give this a try, I guess it should work:

Remoe the existing nat and then add:

object service tcp_smtp

  service tcp destination eq 25

object service tcp_pop3

  service tcp destination eq 110

nat (outside,inside) source static any any destination static interface server1_smtp service tcp_smtp tcp_smtp

nat (outside,inside) source static any any destination static interface server1_pop3 service tcp_pop3 tcp_pop3

Let me know if it works.

Thanks,
Varun Rao
Security Team,
Cisco TAC

Thanks, Varun Rao Security Team, Cisco TAC
Community Member

Re: ASA 8.4 NAT not working

Like this:

ASA Version 8.4(3)
!
hostname ciscoasa
enable password cE8CBbDsv encrypted
passwd encrypted
names
!
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
!
interface Vlan1
nameif inside
security-level 100
ip address 192.168.1.253 255.255.255.0
!
interface Vlan2
nameif outside
security-level 0
ip address 95.*.*.218 255.255.255.248
!
ftp mode passive
object network obj_any
subnet 0.0.0.0 0.0.0.0
object network server1_smtp
host 192.168.1.10
object network server1_pop3
host 192.168.1.10
object service tcp_smtp
service tcp destination eq smtp
object service tcp_pop3
service tcp destination eq pop3
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq smtp
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq pop3
pager lines 24
logging asdm informational
mtu inside 1500
mtu outside 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
nat (outside,inside) source static any any destination static interface server1_smtp service tcp_smtp tcp_smtp
nat (outside,inside) source static any any destination static interface server1_pop3 service tcp_pop3 tcp_pop3
!
object network obj_any
nat (inside,outside) dynamic interface
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 95.*.*.217 1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
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
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
client-update enable
telnet timeout 5
ssh timeout 5
console timeout 0

dhcpd auto_config outside
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
webvpn
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
  message-length maximum client auto
  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
  inspect ip-options
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
Cryptochecksum:67e389016172f43c03293912765d3741

Red

ASA 8.4 NAT not working

Absolutely...

Thanks,
Varun Rao
Security Team,
Cisco TAC

Thanks, Varun Rao Security Team, Cisco TAC
Community Member

Re: ASA 8.4 NAT not working

Pff, still no go...I can't understand why... Maybe a packet trace is usefull?

First picture is from my message : Jul 17, 2012 10:20 AM

Second Picture after the change made on: Jul 17, 2012 2:08 PM

Maybe that can help?

Super Bronze

ASA 8.4 NAT not working

Hi,

You need to use the actual public IP address as the destination address and not the private/local IP.

The CLI version of the packet-tracer command would be easier to look through at since you can just copy paste the result to the post here on the forums

- Jouni

Red

ASA 8.4 NAT not working

Use this:

packet-tracer input outside tcp 1.1.1.1 23456 25 detailed

Thanks,
Varun Rao
Security Team,
Cisco TAC

Thanks, Varun Rao Security Team, Cisco TAC
Community Member

Re: ASA 8.4 NAT not working

Could you please a bit more explicite Varun?

Should the command look like this?

packet-tracer input outside tcp 192.168.1.10 25 95.*.*.218 25 detailed

Thanks!

Community Member

Re: ASA 8.4 NAT not working

Here is the result (attached). I hope it's what you wanted. Thanks for help Varun!

Red

ASA 8.4 NAT not working

Hi Tim,

You have the wronmg packet-tracer command, sorry I could not find time earlier as I was on my way back home, here's the right one:

packet-tracer input outside tcp 1.1.1.1 23456 95.*.*.218 25 detailed

you are testing the connection for any internet IP coming from any random port, for which you have 1.1.1.1 & 23456

Thanks,
Varun Rao
Security Team,
Cisco TAC

Thanks, Varun Rao Security Team, Cisco TAC
Community Member

Re: ASA 8.4 NAT not working

Oke, Varon, I understand! I have posted the result as an attachment! Curious is you can find something in the result!

Community Member

Re: ASA 8.4 NAT not working

Community Member

ASA 8.4 NAT not working

Can you post a screen shot of how your nat statements look in ASDM?  I have seen on more than one occasion that the order that the NAT statements are in have screwed things up.

Community Member

Re: ASA 8.4 NAT not working

Hi! Thanks for your help!

After applying the following NAT and Access commands to the ASA:

object network server1_smtp
host 192.168.1.10
nat (inside,outside) static interface service tcp smtp smtp
!
!
object network server1_pop3
host 192.168.1.10
nat (inside,outside) static interface service tcp pop3 pop3
!
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq 25
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq 110
!
access-group outside_access_in in interface outside

ASDM looks like this:

--------------------------------------------------------------------

In a second attempt applying this commands:


object network server1_smtp
host 192.168.1.10

!
!
object network server1_pop3
host 192.168.1.10

!
object service tcp_smtp

  service tcp destination eq 25


object service tcp_pop3

  service tcp destination eq 110


nat (outside,inside) source static any any destination static interface server1_smtp service tcp_smtp tcp_smtp

nat (outside,inside) source static any any destination static interface server1_pop3 service tcp_pop3 tcp_pop3


access-list outside_access_in extended permit tcp any host 192.168.1.10 eq 25
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq 110
!
access-group outside_access_in in interface outside

ASDM looks like this:

Both options fail....

Community Member

Re: ASA 8.4 NAT not working

The first screenshot of the ASDM has the nats configured correctly.  However, I don't see a dynamic pat for regular internet access.  I don't think this would cause an issue, but you never know.  To allow internet access, you would need the following command:

nat (inside,outside) source dynamic 'internal-networks' interface.  Change the 'internal-networks' to a group object with your internal networks in it.

Community Member

Re: ASA 8.4 NAT not working

Like:

nat (inside,outside) source dynamic internal interface

?

Community Member

ASA 8.4 NAT not working

That'll do it.

Community Member

Re: ASA 8.4 NAT not working

Sorry m8, it did not..

ciscoasa# packet-tracer input outside tcp 1.1.1.1 23456 95.*.*.218 25 detai$

Phase: 1
Type: ACCESS-LIST
Subtype:
Result: ALLOW
Config:
Implicit Rule
Additional Information:
Forward Flow based lookup yields rule:
in  id=0xd9027508, priority=1, domain=permit, deny=false
        hits=20, user_data=0x0, cs_id=0x0, l3_type=0x8
        src mac=0000.0000.0000, mask=0000.0000.0000
        dst mac=0000.0000.0000, mask=0100.0000.0000
        input_ifc=outside, output_ifc=any

Phase: 2
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in   95.*.*.218   255.255.255.255 identity

Phase: 3
Type: ACCESS-LIST
Subtype:
Result: DROP
Config:
Implicit Rule
Additional Information:
Forward Flow based lookup yields rule:
in  id=0xd9027b88, priority=0, domain=permit, deny=true
        hits=17, user_data=0x9, cs_id=0x0, use_real_addr, flags=0x1000, protocol=0
        src ip/id=0.0.0.0, mask=0.0.0.0, port=0
        dst ip/id=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
        input_ifc=outside, output_ifc=any

Result:
input-interface: outside
input-status: up
input-line-status: up
output-interface: NP Identity Ifc
output-status: up
output-line-status: up
Action: drop
Drop-reason: (acl-drop) Flow is denied by configured rule

Community Member

ASA 8.4 NAT not working

Do you at least have internet access on the internal devices?  Also, in the ASDM, if you fire up the real time log monitor and then try to telnet to port 110 from outside of your network, does it give you any information?  Like what ACL is blocking the connection?

Community Member

Re: ASA 8.4 NAT not working

Hi deyster94,

I have internet connectivity, tested.

Please exam the following, when I apply the following NAT rules:

object network server1_smtp
host 192.168.1.10

!
!
object network server1_pop3
host 192.168.1.10

!
object service tcp_smtp

  service tcp destination eq 25


object service tcp_pop3

  service tcp destination eq 110


nat (outside,inside) source static any any destination static interface server1_smtp service tcp_smtp tcp_smtp

nat (outside,inside) source static any any destination static interface server1_pop3 service tcp_pop3 tcp_pop3


access-list outside_access_in extended permit tcp any host 192.168.1.10 eq 25
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq 110
!
access-group outside_access_in in interface outside

This results in the following packet trace:

*.*.*.69 is the WAN IP from where I try to connect to the firewall over port 110 (telnet *.*.*.69 110).

95.*.*.218 is the WAN IP of the firewall. A said, I have internet connection from the inside network. I can ping 192.168.1.10. From within the Inside network telnet 192.168.1.10 110 works!

This looks like port 110 goes trough the firewall, but I can't still not connect from an external site to the internal server. Any suggestions?

Community Member

ASA 8.4 NAT not working

Tim,

I do my outside to inside nats different than how you them configured.  You can do a nat to an inside address from the object group.  Here is an example:

object network server

host 10.0.0.4

object network server

nat (INSIDE,OUTSIDE) static interface

You can do this in the ASDM on the object.  If you edit the object and click advanced, it will show you more options where you can configure the public IP address and do a PAT as well.

Have you tried this route yet?

Dan

Community Member

Re: ASA 8.4 NAT not working

When my NAT looks like this: (seems like your way of setting NAT up)

Packet Trace looks like this:

My configfile looks like this: (nat (inside,outside) source dynamic internal interface) added

ASA Version 8.4(3)
!
hostname ciscoasa
enable password cE8CB encrypted
passwd 2KFQn encrypted
names
!
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
!
interface Vlan1
nameif inside
security-level 100
ip address 192.168.1.253 255.255.255.0
!
interface Vlan2
nameif outside
security-level 0
ip address 95.*.*.218 255.255.255.248
!
ftp mode passive
object network obj_any
subnet 0.0.0.0 0.0.0.0
object network server1_smtp
host 192.168.1.10
object network server1_pop3
host 192.168.1.10
object network internal
subnet 192.168.1.0 255.255.255.0
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq smtp
access-list outside_access_in extended permit tcp any host 192.168.1.10 eq pop3
pager lines 24
logging asdm informational
mtu inside 1500
mtu outside 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
nat (inside,outside) source dynamic internal interface
!
object network obj_any
nat (inside,outside) dynamic interface
object network server1_smtp
nat (inside,outside) static interface service tcp smtp smtp
object network server1_pop3
nat (inside,outside) static interface service tcp pop3 pop3
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 95.*.*.217 1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
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
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
client-update enable
telnet timeout 5
ssh timeout 5
console timeout 0

dhcpd auto_config outside
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
webvpn
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
  message-length maximum client auto
  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
  inspect ip-options
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
Cryptochecksum:c0bbf3c1c0d4c02400a1a18e2179e3fb
: end

Community Member

ASA 8.4 NAT not working

What happens if you change the source port on your packet trace to something 1024 or greater?  Also, if you click on the + next to access-list, what does it say?  This should tell you what ACL is blocking the traffic.

Community Member

Re: ASA 8.4 NAT not working

That results in this packet trace:

Thanks for your help sofar!

Community Member

Re: ASA 8.4 NAT not working

It points to this list of access rules:

5388
Views
0
Helpful
36
Replies
CreatePlease to create content