Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 2010 03:09:24 +1100 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Lokadamus <lokadamus@gmx.de>
Cc:        Lamac Lamaco <lamacont@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: gateway_enable="NO"
Message-ID:  <20101130015913.W47536@sola.nimnet.asn.au>
In-Reply-To: <20101129052727.7028310656EF@hub.freebsd.org>
References:  <20101129052727.7028310656EF@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In freebsd-questions Digest, Vol 339, Issue 1, Message: 20
On Mon, 29 Nov 2010 01:40:21 +0100 Lokadamus <lokadamus@gmx.de> wrote:
 > Am 25.11.2010 05:38, schrieb Lamac Lamaco:
 > > The system installed now and in adresses /etc or /etc/rc.d there is no
 > > script.
 > > Does system work in default as ROUTER?
 > > I ask this question, because i tried it works.
 > > As it is written  "gateway_enable="NO" # Set to YES if this host will be a
 > > gateway" in the address ->  /etc/defaults/rc.conf
 > >   But if I write  gateway_enable="NO"  in the address /etc/rc.conf , my
 > > system will work in as ROUTER. I say this because the host in my system's
 > > local network can ping my system's global IP. As i know it can be only in
 > > ROUTER.

No, being able to ping any address on any interface on a system is not 
the same as being able to route packets elsewhere through that system.

Only specific firewall rules would prevent that, if you had some need to 
deny inside net hosts access to some service/s bound to your outside IP.

If a local network host can ping anywhere outside through your system, 
then it's acting as a gateway aka router for that host; not otherwise.

 > > Thanks.

No worries.

 > No, in default FreeBSD isn't working as a router.

Right.

 > Look with sysctl at:
 > net.inet.ip.fw.default_to_accept
 > When is it set to 1, FreeBSD is working as a router, with a value of 0 
 > it doesn't work as a router.

Wrong; sysctl net.inet.ip.fw.default_to_accept has nothing to do with 
this; gateway_enable=YES causes setting sysctl net.inet.ip.forwarding=1

 > Look with tcpdump where networktraffic is going.
 > 
 > http://www.freebsd.org/doc/handbook/network-routing.html

Good advice.

cheers, Ian



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