cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
606
Views
0
Helpful
3
Replies

Static NAT Can't get outside access from inside - outside to in is fine

it-dept01
Level 1
Level 1

Hello,

I am testing a new ASA and I am having difficulties getting a machine that I have set up a static NAT for, getting out to the internet. It seems that I can get the traffic in. The test server is a test web server and from the outside I can reach it on the public facing IP...We'll just call that IP 1.2.3.4 (NATTESTOUT). The internal address that nat is set up for is 192.168.1.200 (NATTest).

No traffic seems to go out from that machine though other machines set up with the dynamic NAT rule are able to get out.

Let me know if you need additional information.

1.2.3.1 = Outside Interface

1.2.3.2 = ISP Gateway

1.2.3.4 = Outside NAT IP for webserver 192.168.1.200 - which cannot get out to Internet but reachable from the outside

I'm sure some of my access rules are unnecessary but I was trying to find the right combo and then work backwards from there...

Here is my config:

ASA Version 9.5(1)
!
hostname ciscoasa
enable password encrypted
names
!
interface GigabitEthernet1/1
nameif outside
security-level 0
ip address 1.2.3.1 255.255.255.240
!
interface GigabitEthernet1/2
nameif inside
security-level 100
ip address 192.168.1.1 255.255.255.0
!
interface GigabitEthernet1/3
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet1/4
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet1/5
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet1/6
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet1/7
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet1/8
shutdown
no nameif
no security-level
no ip address
!
interface Management1/1
management-only
no nameif
no security-level
no ip address
!
ftp mode passive
clock timezone EST -5
clock summer-time EDT recurring
object network obj_any
subnet 0.0.0.0 0.0.0.0
object network NATTest
host 192.168.1.200
object network NATTESTOUT
host 1.2.3.4
object-group service DM_INLINE_SERVICE_1
service-object tcp destination eq www
service-object tcp destination eq https
service-object udp destination eq www
object-group protocol TCPUDP
protocol-object udp
protocol-object tcp
object-group network DM_INLINE_NETWORK_1
network-object host 192.168.1.100
network-object host 192.168.1.6
access-list inside_access_in extended permit ip any any
access-list inside_access_in extended permit object-group DM_INLINE_SERVICE_1 an y 192.168.1.0 255.255.255.0
access-list outside_access_in_1 extended permit ip any object NATTest
access-list outside_access_in_1 extended permit ip any any
access-list outside_access_out extended permit ip any any
access-list inside_access_out extended permit ip any any
pager lines 24
logging enable
logging asdm informational
mtu outside 1500
mtu inside 1500
no failover
no monitor-interface service-module
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
!
object network obj_any
nat (any,outside) dynamic interface
object network NATTest
nat (inside,outside) static NATTESTOUT
access-group outside_access_in_1 in interface outside
access-group outside_access_out out interface outside
access-group inside_access_in in interface inside
access-group inside_access_out out interface inside
route outside 0.0.0.0 0.0.0.0 1.2.3.2 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
user-identity default-domain LOCAL
aaa authentication ssh console LOCAL
aaa authentication enable console LOCAL
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
service sw-reset-button
crypto ipsec security-association pmtu-aging infinite
crypto ca trustpoint _SmartCallHome_ServerCA
no validation-usage
crl configure
crypto ca trustpool policy
crypto ca certificate chain _SmartCallHome_ServerCA
certificate ca 6ecc7aa5a7032009b8cebcf4e952d491

quit
telnet 192.168.1.0 255.255.255.0 inside
telnet timeout 5
no ssh stricthostkeycheck
ssh 192.168.1.0 255.255.255.0 inside
ssh timeout 60
ssh key-exchange group dh-group1-sha1
console timeout 0

dhcpd auto_config outside
!
dhcpd address 192.168.1.5-192.168.1.254 inside
dhcpd enable inside
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
dynamic-access-policy-record DfltAccessPolicy
username user1 password encrypted
username user1 attributes
service-type nas-prompt
username password encrypted privilege 15
!
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
service call-home
call-home reporting anonymous
call-home
contact-email-addr
profile CiscoTAC-1
destination address http https://tools.cisco.com/its/service/oddce/services/DD CEService
destination address email callhome@cisco.com
destination transport-method http
subscribe-to-alert-group diagnostic
subscribe-to-alert-group environment
subscribe-to-alert-group inventory periodic monthly
subscribe-to-alert-group configuration periodic monthly
subscribe-to-alert-group telemetry periodic daily
Cryptochecksum:
: end

Thanks,

3 Replies 3

Jon Marshall
Hall of Fame
Hall of Fame

Try changing -

"nat (any,outside) dynamic interface"

to

"nat (any,outside) after-auto dynamic interface"

and retest.

Edit - if that works it means the server 192.168.1.200 will always go out with the public IP 1.2.3.4.

Is that what you want ?

Jon

That is indeed what I want. However I could not get your command to take. It doesn't like it...nat (any,outside) after-auto dynamic interface...it gets hung up on dynamic...

So I ended up through the ? with: 

nat (any,outside) after-auto source dynamic any pat-pool interface

Not sure if that is the equivalent or not...

None the less it gives that same results...

Was there something missing in your command or something I did wrong?

Thanks

Try the syntax - nat (any,outside) after-auto source dynamic any interface

Review Cisco Networking for a $25 gift card