FreeBSD Gateway, Crossover

Matthias Apitz guru at
Sun Dec 4 18:41:55 UTC 2011


El día Sunday, December 04, 2011 a las 01:21:58PM -0500, APseudoUtopia escribió:

> Hello,
> I'm trying to setup a small home network, It consists of my FreeBSD
> 9.0-RC2 box connected to my modem (just a modem, not modem/router) and
> two other systems connected directly via ethernet to the freebsd box.
> I'm able to connect to the internet with the FreeBSD box. I can get an
> IP via DHCP from my ISP. However,

Does this mean that you do PPP via the modem? If so, you should have
some interface tunN with the IP assigned by the ISP.

> I can't seem to figure out how to
> setup the gateway routes and the IP addresses for the other system.

you must enable gateway in the rc.conf file with:


> I'd like to have the internal network be on I have 2x
> 2-port NICs in the freebsd box.
> em0 - Internet -
> em1 - System1 -
> em2 - System2 -

if you connect the two other boxes directly to the NICs of FreeBSD you
must use crossover cables and should assign to each connection a
separate network; or you connect all three boxes via a HUB or switch in
only one network;

the other boxes should have the FreeBSD as default gateway in their
routing and in the FreeBSD you must use IPF and IPNAT to hide your
network(s) behind the tunN interface's IP addr; I do this at home too
having attached by Linux based cellphone via USB networking and this
has access to Internet through the FreeBSD laptop;

Matthias Apitz
e <guru at> - w
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5

More information about the freebsd-questions mailing list