Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 192.168.0.1 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

1 Answer 1

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 192.168.0.1

  • 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

 
discard

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.