Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2004 08:49:35 -0600
From:      Nathan Kinkade <nkinkade@ub.edu.bz>
To:        stefan@swebase.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: help with ipfw
Message-ID:  <20040225144935.GD11671@nkinkade.bmp.ub>
In-Reply-To: <0ec101c3fb85$ed7d7470$702450d5@swebasestefan>
References:  <0ec101c3fb85$ed7d7470$702450d5@swebasestefan>

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

--6TME3aayZmn2Ikqb
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Feb 25, 2004 at 10:58:32AM +0100, stefan@swebase.com wrote:
> Hi
> I've setup a box here to act as a router/firewall for a bunch of
> servers that will be behind it. Both nics seem to respond nicely but
> only the first one thats connected to the outside was able to be
> configured from sysinstall the second one thats connected to a, right
> now empty, switch i had to set myself with ifconfig dc0 inet <ip> but
> i need to set gateway and so on for it. Where can i do this?  Also, if
> it now IS correctly configured, how come it wont route packets? I
> hooked up the office wlan to it and set an allow any to any rule but
> it still wont work.
>=20
> Med v=E4nliga h=E4lsningar
>=20
> Stefan Midjich, Swebase AB

To set a default gateway, you can issue the follwing command:

# route add default <gateway ip address>

To make sure it gets set on each reboot you define a default gateway in
your /etc/rc.conf file with a line like:

defaultrouter=3D"<some ip address>"

If you want the machine to act as a router then you need to turn on
ip forwarding.  You can do this immediately by issuing the following
command:

# sysctl net.inet.ip.forwarding=3D1

=2E.. and then you can add the following line to /etc/rc.conf to make sure
that this sysctl is set on each reboot:

gateway_enable=3D"YES"

Nathan
--=20
gpg --keyserver pgp.mit.edu --recv-keys D8527E49

--6TME3aayZmn2Ikqb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQFAPLX/O0ZIEthSfkkRAiN2AJ9ni+oQHla54L0hzOHGMLf5pi78mACaAlRL
+4u+6BL7DMUdLRvxZXvBpdg=
=ggio
-----END PGP SIGNATURE-----

--6TME3aayZmn2Ikqb--



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