Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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?

share|improve this question
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
up vote 0 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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