Iptables port mapping from two PCs to one
- by Anton
We have 3 PCs, two of it are connected to internet (both of it have 2 NIC)
PC1:
eth0 - 1.0.0.1 (external IP)
eth1 - 172.16.0.1 (internal IP)
PC2:
eth0 - 1.0.0.2 (external IP)
eth1 - 172.16.0.2 (internal IP)
PC3:
eth0 - 172.16.0.3 (internal IP)
Now we want to map port 80 from PC1 and PC2 to PC3.
But there is the problem: iptables port forwarding works well from PC1 or PC2, but only in case if PC3 have PC1 or PC2 as gateway.
So, question is: can we have port mapping from both PC1 and PC2 regardless of gateway settings on PC3?
Thank you in advance.