Networking : how to bridge two NICs to share internet access ?

Patricia Fraser trish at thefrasers.org
Thu Aug 25 00:57:38 UTC 2005


Hi Vincent,

> Hello, network gurus, newb need help :-)
>
> I have two Ethernet controllers in my machine. One is connected
> (DHCP) directly to the cable modem, to access internet.
>
> The other NIC is there to play/experiment with local networking.
> In System->Administration->Networking, I set it to 'fixed IP' an gave
> it the address 10.0.0.0 and accepted the default subnet mask
> (255.0.0.0), since I don't know any better...

Instead of 10.0.0.0, you should be using a 192.168.*.* address; and you 
need to give that NIC a single address, say 192.168.1.1 and then choose 
the next one in the series (192.168.1.2) for the next machine, and so 
on. (If you're just adding a single machine, you don't need a hub or 
switch, but they're really cheap, and switches are also clever, so: why 
not go for it? Then you can add extra machines as you like.)

Then you need to add the second machine to your /etc/hosts file; then 
you need to allow masquerading on your firewall; then you need to add 
routing. 

On your second machine, you need to set up the IP address for the NIC, 
and add the routing so that it knows where to look for the gateway.

There's a really good tutorial to get you started at:

http://www.tldp.org/HOWTO/NET3-4-HOWTO.html

Cheers!
-- 
Trish Fraser, W1S0B 8Q2KH
144.720151832495, -37.5827709834421
do aug 25 10:50:03 EST 2005
GNU/Linux 1997-2004 #283226 counter.li.org
andromeda up 3 day(s), 16 hour(s), 6 min, 4 sec
kernel 2.6.11-6mdk
--




More information about the ubuntu-users mailing list