cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6658
Views
0
Helpful
36
Replies

ASA 8.4 NAT not working

Tim Roelands
Level 1
Level 1

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...

      

36 Replies 36

varrao
Level 10
Level 10

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

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...

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

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.

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

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

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

Absolutely...

Thanks,
Varun Rao
Security Team,
Cisco TAC

Thanks,
Varun Rao

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?

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

Use this:

packet-tracer input outside tcp 1.1.1.1 23456 25 detailed

Thanks,
Varun Rao
Security Team,
Cisco TAC

Thanks,
Varun Rao

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!

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

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
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: