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

William Chapman jeddahbill at gmail.com
Wed Aug 24 23:59:06 UTC 2005


On 8/24/05, Vincent Trouilliez <vincent.trouilliez at modulonet.fr> wrote:
> 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...
> 
> The fist thing I would like to try/fiddle with is :
> 
> Connect a second machine to this NIC, and access internet.
> How do I do to access internet (eth0) from the local network (eth1), is
> that something called "bridging" or something ?! Is it difficult to set
> up ? Can be it be done using some GUI in Breezy, or do I need to tweak
> some config file somewhere (I don't mind of course) ?
> 
> Thanks much in advance ! :-)
> 
> 
> Regards,
> 
> 
> --
> Vince
> 
> 
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> 

Vincent,

You probably already realize that what you're endeavoring to do with
your "multi-homed" Linux box is in essence what a "broadband NAT
(network address translation) router" does for the typical home/small
office environment.  Such routers typically include wireless
capability these days, e.g., Netgear WGT624 and others by Linksys,
D-Link, etc.  The "broadband" term refers to the port for the DSL or
cable modem, i.e., the internet access.  Because of the NAT, such a
router is in many respects a natural firewall, and most commercial
devices include additional firewall functions.

To focus on a particular element of your setup, the Ethernet port
fixed to ip address 10.0.0.0, which port would correspond to one of
several (typically four) on the commercial routers for home use, I
would like to call your attention to one of the documents that govern
the internet architecture:  RFC 1918 - Address Allocation for Private
Internets (link below):

http://www.faqs.org/rfcs/rfc1918.html

This document (one of a large family of internet governing documents)
addresses the question of what address to use on the "private" side of
the router, and therefore addresses your comment, "...since I don't
know any better..."

Reinventing the wheel is a great way to learn; but at some point, it's
useful to know what those who have gone before have done.

Also, for your Linux box to be useful as a router and firewall to
provide internet access to other networked systems you will probably
need at least a couple more Ethernet ports.

Recommended reading (besides the RFC documents):  TCP/IP Illustrated
Volume 1 by W. R. Stevens.

Good luck!

Bill Chapman




More information about the ubuntu-users mailing list