Gateway machine with 2 NIC one connecting public network and one for private network.
Gateway:
eth0 4.x.x.3
Eth1:10.10.11.3
There are 5 Machines with this as gateway all with ip 10.10.11.5---9 with gateway as 10.10.11.3
DNAT :
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT all -- anywhere 4.x.x.5 to:10.10.11.5
DNAT all -- anywhere 4.x.x.6 to:10.10.11.6
DNAT all -- anywhere 4.x.x.7 to:10.10.11.7
SNAT on Gateway
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT all -- 10.10.11.5 anywhere to:4.x.x.5
SNAT all -- 10.10.11.6 anywhere to:4.x.x.6
SNAT all -- 10.10.11.7 anywhere to:4.x.x.7
This rule was not working until i assign public ip on gateway on interface, seems issue with ARP .
Question1 Is there a way to avoid assigning public ip on interface to solve ARP issue
Question2: Could some one explain me reason for ARP failure other than ARP is layer 1 and NAT is layer 3