I have been seeing this concept of Twice NAT on cisco devices and Double NAT on Checkpoint devices. Somehow I am not able to understand how they work. Are they the same? Could anyone please explain whaht these concepts actually achieve?
I am mainly looking for an example where the destination also changes.
You are right that twice NAT simply means that both the source and the destination IP addresses in the packet are translated. In the new NAT syntax of ASA 8.3 and 8.4, you can do this in a single command:
object network obj-10.1.1.1
object network obj-192.168.1.1
object network obj-172.16.1.1
nat (inside,outside) source static obj-10.1.1.1 interface destination static obj-192.168.1.1 obj-172.16.1.1
With this example, if a packet sourced from 10.1.1.1 and destined to 192.168.1.1 arrives at the inside interface, the ASA will translate the source address to the outside interface IP. It will also translate the destination address to 172.16.1.1.
You can find more configuration examples here:
Hope that helps.
Thanks for the reply. I have a question here.
Traffic will get initiated from 10.1.1.1 and the ultimate destination will be 172.16.1.1 (translated destination address). The source address (10.1.1.1) will get hide natted to the interface address. The translated destination address (172.16.1.1) will get translated to the external destination (192.168.1.1). so the traffic is like this
1. SA: 10.1.1.1 DA: 172.16.1.1
After the traffic leaves the outside interface
2. SA: Firewall Interface address DA: 192.168.1.1
Return traffic from 192.168.1.1 will get natted back to 172.16.1.1 once it reaches the firewall
Please confirm whether I am correct here.
You're correct on the source address but the destination address should be reversed:
1. SA: 10.1.1.1, DA: 192.168.1.1
After leaving the firewall:
2. SA: Outside interface IP, DA: 172.16.1.1
I guess Shyam was right in his statement.As per this cisco dcument:
The format of the command is "static(inside,outside) source static real_ip mapped_ip destination static mapped_ip real_ip".
So , SA=10.1.1.1 DA=172.16.1.1
After leaving the firewall
SA=Outside Interface DA=192.168.1.1
I went through your query and have found link's which would help you in solving your query.
As rightly said the Twice NAT is performed on the cisco devices and for the same please refer to the following link as it would help you understand its fundamentals:-
Secondly Double NAT is performed on the Checkpoint Devices the following link will be helpful for the same:-