Servers 1-4 each have one device, eth0. They are all connected to the switch, and they all obtain their DHCP information from Server 0. eth0 has the following interfaces entry (This is because Servers 1-4 are diskless nodes that ask Server 0 for everything needed to boot):

iface eth0 inet manual

With this configuration, Server 0 is the only server that has access to the internet. How would I go about routing any web request (such as apt-get or HTTP) from Servers 1-4 through Server 0 in order to give Servers 1-4 internet access? This seems like a problem that has been encountered many times, but I cannot for the life of me figure out how to set up the network properly.

1 Answer
1

You need to put two things : activating the forwarding (in /etc/sysctl.conf net.ipv4.ip_forward=1) and activate the NAT with iptables (/sbin/iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE).
The NAT translate the private network to the external IP, so the internal machines can go on Internet. This line should be applied by your firewall. I don't know which firewall you have, so you must integrate it in your configuration.