I'm trying to create the following setup:

One Linux machine with two network interfaces connected to a college network (on eth0). On the other adapter (eth1) I'd like to connect a hub and create a subnet with 2 other machines. I'd like the Linux machine to forward all traffic from the subnet (eth1) to eth0, so that to the college network it appears as if all internet traffic is coming from that one machine (otherwise the network disconnects me... college policy!). It's important that I can use more than one machine for my course.

Currently I have the bridged network working, but all machines get an IP from the college network. How can I set the Linux machine up so that the second adapter has an IP of and any machines connected to it 192.168.0.*, and all traffic is forwarded through eth1?

  • To me it is not clear what you want your Linux router to do: NAT or bridging. Can you post your /etc/network/interfaces file? – Duijf Oct 4 '11 at 11:48

Simply configure the linux box as an IP router not as an Ethernet bridge.

Very simple done:

  • Enable dynamic IP configuration on the adapter on the college-Net.

  • On the adapter of the local network do a manual (fixed) configuration to use

  • Set up a DHCP server serving this network (!!! Make sure, you don't ever answer DHCP requests coming through the college-net adaptor - otherwise you may find yourself in a very close and intense conversation with the Admins of the college-net!!! - if you're unsure, ask them beforehand)

  • Set up NAT (Network Address Translation) for the local clients for requests going out to the college-network

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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