cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
481
Views
10
Helpful
3
Replies

NAT on ASA

j.rohit0707
Level 1
Level 1

ASA 5505 gets it's static IP address on the outside interface through DHCP.

ISP routes a /29 to that DHCP assigned address.

Traffic from LAN to internet uses a Dynamic PAT (Hide) rule in section 3. The translated packet's source address is the IP address assigned through DHCP which is fine for clients on the LAN browsing the internet.

What I would like to achieve:

Access from internet to multiple servers on LAN while preserving as much of the /29 block as possible.

The public IP address that is used to access the server on the LAN must also be the IP address that is used as the source address for any traffic originating from that server and destined to the internet. It must not be the DHCP assigned address that is used by other hosts on the LAN using the Dynamic PAT (Hide) rule.

What I have tried:

Network Object NAT achieves that two-way relationship where the public IP address for that particular server is the same in both directions, but at the cost of a public IP address for every server, see http://www.cisco.com/c/en/us/td/docs/security/asa/asa83/asdm63/configura....

Network Object PAT gives the possibility to publish multiple hosts with different services/ports using one public IP address, see http://www.cisco.com/c/en/us/td/docs/security/asa/asa83/asdm63/configura.... But in that case the outgoing public IP address is the DHCP assigned one and that is not what I want.

Why do I want this:

I want the incoming and outgoing public IP address of my mail server to be the same and yet be able to use that same public IP address for a webserver that is running on another host.

Is this possible with an ASA?

Maybe it's my way of thinking but I think it is odd when traffic from the internet to a server on the LAN uses one public IP address and traffic from that server to the internet uses another.

Thanks in advance

1 Accepted Solution

Accepted Solutions

You can combine these different methods and configure different NAT-rules for incoming and outgoing traffic. For Incoming Traffic it could look like the following:

object network PUBLIC-IP1
host 192.0.2.10

object network Webserver-HTTP
host 10.10.10.80
nat (inside,outside) static PUBLIC-IP1 service tcp 80 80
This will not match on outgoing traffic, so you need another rule:

object network WEBSERVER
host 10.10.10.80
nat (inside,outside) after-auto source dynamic WEBSERVER PUBLIC-IP1

Spooster IT Services Team

View solution in original post

3 Replies 3

You can combine these different methods and configure different NAT-rules for incoming and outgoing traffic. For Incoming Traffic it could look like the following:

object network PUBLIC-IP1
host 192.0.2.10

object network Webserver-HTTP
host 10.10.10.80
nat (inside,outside) static PUBLIC-IP1 service tcp 80 80
This will not match on outgoing traffic, so you need another rule:

object network WEBSERVER
host 10.10.10.80
nat (inside,outside) after-auto source dynamic WEBSERVER PUBLIC-IP1

Spooster IT Services Team

It's working thanks :-)

Great. You are welcome.

Spooster IT Services Team
Review Cisco Networking for a $25 gift card