Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jul 2004 19:56:33 -0500
From:      "James A. Coulter" <james.coulter@cox.net>
To:        <freebsd-questions@freebsd.org>
Cc:        'Dancho Penev' <dpenev@mnet.bg>
Subject:   SOLVED: NEWBIE: FreeBSD 4.10 Internet gateway/DNS problem
Message-ID:  <000401c4704f$e6691470$6e01a8c0@sabrina>
In-Reply-To: <200407131906.05044.admin@swedehost.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > On Tue, Jul 13, 2004 at 10:51:21AM -0500, James A. Coulter wrote:
> > >
> > >I am trying to setup my FreeBSD 4.10 box as an internet gateway for =
a
> > > small home LAN (2x Win XP and 1x Win 98SE)
> > >
> > >The LAN operates without any problems when using the Win 98SE box =
as a
> > >gateway - all computers can access the internet
> > >
> > >I have two nics installed in the FreeBSD box:
> > >
> > >	dc0 is the LAN interface via 4-port Linksys hub
> > >
> > >	dc1 is the WAN interface via cable modem
> > >
> > >I have successfully connected to the internet with dc1
> > >
> > >I can ping all other machines on my home LAN with dc0 and vice =
versa
> > >
> > >I cannot access the internet from any machine except the FreeBSD
> gateway
> > >
> > >ifconfig looks like this:
> > >

<snip>

> > >
> > >I'm not sure what to do next.  For some reason the Windows cannot
> access a
> > >name server.  From what I understand from the literature I've been
> using
> > >(FreeBSD Handbook, Lehey's The Complete FreeBSD, and Anderson's
> FreeBSD:
> > > An Open-Source etc etc) all that should be needed is set
> > > gateway_enable=3D"YES" in /etc/rc.conf and I've done that.
> > >
> > >Google revealed some info on using natd for PPOE, but not sure if =
that
> > >applies to this problem.
> >
> > Definitely you must use NAT. Search Handbook for Network Address
> > Translation.
> >
> > >All suggestions/out-right solutions appreciated.
> > >
> > >TIA,
> > >
> > >Jim C.
> > >
> Hello.
> You might try something like this in your /etc/rc.conf :
> gateway_enable=3D"YES"
> ifconfig_dc1=3D"DHCP"
> dhcp_program=3D"/sbin/dhclient"
> dhcp_flags=3D"-q"
> ifconfig_dc0=3D"inet 192.168.1.1 netmask 255.255.255.0"
> natd_enable=3D"YES"
> natd_interface=3D"dc0"
> natd_flags=3D"-dynamic"
> And if you like some little protection :
> firewall_enable=3D"YES"
> firewall_script=3D"/etc/rc.firewall"
> firewall_type=3D"OPEN"
> firewall_logging=3D"YES"
> And it's never wrong to spend some time reading the man pages :-)
> Don't forget to put the IP of your Gateway on the Winboxes.
> /Hasse

Sorry for the very late response and thanks very much for the =
suggestions to
check out NAT.  That was of course the problem.  Being a newbie and
life-long Windows user, I thought gateway_enable=3D"YES" in rc.conf was =
the
magic word.  But it isn't and I read up on NAT and natd and built a =
custom
kernel with:

options IPFIREWALL
options IPDIVERT

and made the changes to rc.conf as detailed above and now my FreeBSD box =
is
passing packets back and forth from all the Windows boxes on my LAN to =
the
WAN beautifully.

Thanks again for your help!

Jim C.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000401c4704f$e6691470$6e01a8c0>