I am new to iptables and NAT. But I am working on it through various material both in online and books. I have a doubt regarding NAT implementation using iptables.
Let us suppose my network scenario is as shown below.
linuxbox2 (10.0.0.3) | | linuxbox1-------- Switch ----- INTERNET (10.0.0.2) (188.8.131.52)
My Linux boxes 1 & 2 connect to the internet via switch and I have only one Public IP-Address(184.108.40.206). But the communication is a bit strange. box2 does not connect directly to outerworld via switch. But it is in vlan with box1. Hence traffice from box2 goes to box1 then travels down to switch to connect to outer world. We does natting at box1
Since we try to masquerade to the same public ip-address what should be the rules in iptable.
My question might be strange but I am not able to explain it clealry ...
Started a new thread with more details and outputs at