Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In our departement we have a blade system with one master node and four slave nodes that are connected to the master node. The system uses its own subnet (192.168.1.x) and only the master node is connected to the intranet (and thereby to the internet). On every node runs CentOS 5. I would like to update CentOS (by using yum). How to update the slave nodes as they don't have direct access to the intranet/internet. Could you please lead me in the right direction how to setup a forwarding/routing so that the slave nodes can do requests to the intranet/internet, too?

More details about the setup:
- master node

- 4 slave nodes
Connected to master eth0
IPs (fetched using DHCP running on master)

Only (=master) is allowed to access the internet (by using a proxy).

share|improve this question

closed as not a real question by Chopper3, Ladadadada, voretaq7 Jul 26 '12 at 20:58

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

More information is needed about your network setup like default gateway of system nodes and IPs allowed to access Internet. – Khaled May 8 '12 at 13:12
Sure ... I updated the question. – Zardoz May 8 '12 at 13:32
You've added maybe 1% of info we'd need. – Chopper3 May 8 '12 at 13:39
up vote 2 down vote accepted

If you want to provide Internet access using the same public IP address, you need to use iptables to do SNAT (source NAT):

iptables -o eth1 -A POSTROUTING -s -j SNAT --to-source
iptables -o eth1 -A POSTROUTING -s -j SNAT --to-source
iptables -o eth1 -A POSTROUTING -s -j SNAT --to-source
iptables -o eth1 -A POSTROUTING -s -j SNAT --to-source

You need also to enable IP forwarding on the master node. Run as root:

# echo 1 > /proc/sys/net/ipv4/ip_forward
share|improve this answer
Thanks a lot. That was the hint I was searching for. – Zardoz May 8 '12 at 14:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.