I have an experimental setup, of 4 linux (CentOS) machines:
All 4 machines are internally connected using different networks and can ping eachother directly connected interfaces. However only PC4 has access to internet.
I am trying to setup iptable rules that can allow PC1 to be able to access internet via PC4, but i have no idea how to do this.
I tried to add NAT at outgoing interface on PC2, PC3 and PC4:
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
However, this does not work, can you give me some idea how in such a setup i can make PC1 access 10.0.0.1 network??