I have the following NAT setup:
+--------------+ +-----------------------+ +-------------------+
| | | | | |
| | | | | |
| PC 1 | | PC 2 (NAT) | | PC 3 |
| 10.0.0.3 +-------+ +-----+ 10.0.0.4 |
| | | | | (NAT 172.24.4.2) |
| | | | | |
+--------------+ +-----------------------+ +-------------------+
Whereas PC2 will do a NAT such that 10.0.0.4 will be translated to 172.24.4.2 during prerouting:
-A PREROUTING -d 172.24.4.2/32 -j DNAT --to-destination 10.0.0.4
When I try to ping from PC1 to PC3 with destination IP 172.24.4.2. Some how the packet is not doing any DNAT for me.
Here is what I capture on PC3:
10:15:41.017632 IP 10.0.0.3 > 172.24.4.2: ICMP echo request, id 8705, seq 0, length 64
It works fine if I change PC3 IP to a different subnet.
Does anyone know why?