Normally it should work as Rene has previously explained because the direction doesn’t matter for the ASA, the only thing that matters is what to translate. If you want that the request is sourced from the inside, you can specify “unidirectional” by end of the command of nat(inside,outside) static so the destination addresses cannot initiate traffic to the source addresses.
Hope this can help.
1 Like
shantel
(Shantel - Networklessons.com)
Split this topic
22
Make sure that all of the commands you have entered are as described in the lesson. Keep in mind also that you will require the use of an access list to allow the traffic to go through, otherwise it will be dropped. Specifically, for ASA versions before 8.3, you will need to issue the following command:
ASA1(config)# access-list OUTSIDE_TO_DMZ extended permit tcp any host 192.168.1.1
For version 8.3 and later, you will have to substitute the “real” IP address for the “NAT translated” address. So the command would look like this:
ASA1(config)# access-list OUTSIDE_TO_DMZ extended permit tcp any host 192.168.2.200
Depending on the version you have, you should put in the appropriate command.
We are translating 192.168.2.200 to 192.168.1.1 to reach the same…normally as explained is translating adress is equal to the webserver ip… in am confused
This is not bi-directional NAT since we only translate one address here. If you use static NAT then you have a 1:1 relation, you can’t use the IP address for any other devices. If that’s what you want, you need to use PAT instead.
As to why we translate like this. Imagine the outside IP address is not 192.168.2.254 but some public IP address. If you want the web server to be reachable from the outside world, you’ll have to use NAT since the web server is using a private IP address.
Hi Rene,
When you say the direction does not matter,does that mean that writing the command like (inside,outside) or (outside,inside) becomes irrelevant.If i compare what you explain when the outside client wants to connect to DMZ server inside,your nat statement is
This statement will cause a translation from host 192.168.1.1 which is on the DMZ to be translated to a static external IP address of 192.168.2.200. This translation functions both ways, meaning that when 192.168.1.1 communicates with devices on the outside, the source address of this communication will be translated to 192.168.2.200, and when any outside devices communicate with 192.168.2.200, this destination address will be translated to 192.168.1.1.
This does not mean that we can switch the DMZ and OUTSIDE keywords in the NAT command and get the same result. The results will indeed be different.
This statement will cause a translation from host 192.168.1.1 which is on the OUTSIDE to be translated to a static IP address of 192.168.2.200 on the DMZ. This means that when 192.168.1.1 communicates with devices on the DMZ, the source address of this communication will be translated to 192.168.2.200, and when any DMZ devices communicate with 192.168.2.200, this destination address will be translated to 192.168.1.1.
Thanks,i think it makes sense now.By flipping the order inside(inside,outside)will change the whole meaning of the direction of the traffic and also the respective natting.
One more question.
When we define a Static Host Entry on the inside and refer to it in the Nat statement,are we saying it will use the Host Ip address.
does this mean that the nat statement already knows the when we type “inside”,it should pick the IP address from the Object Network to be used as the Source.??
I get the idea but just want to confirm the flow of the how to read the NAT statement.
If the traffic was coming from outside to this Webserver,the above should still work as its Bidirectional.
Am i right…??