Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Dec 2011 19:43:03 +0100
From:      Matthias Apitz <guru@unixarea.de>
To:        APseudoUtopia <apseudoutopia@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: FreeBSD Gateway, Crossover
Message-ID:  <20111204184302.GA1175@tiny>
In-Reply-To: <CAKOHg=M7LvufyzcTAWw_o-yODzbjTb1CjcrVWFcjqr1yx9PaJA@mail.gmail.com>
References:  <CAKOHg=M7LvufyzcTAWw_o-yODzbjTb1CjcrVWFcjqr1yx9PaJA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Hello,

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:

gateway_enable="YES"

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

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;

HIH
	matthias
-- 
Matthias Apitz
e <guru@unixarea.de> - w http://www.unixarea.de/
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111204184302.GA1175>