Ian Smith smithi at
Mon Nov 29 16:09:27 UTC 2010

In freebsd-questions Digest, Vol 339, Issue 1, Message: 20
On Mon, 29 Nov 2010 01:40:21 +0100 Lokadamus <lokadamus at> 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.


 > 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.

Good advice.

cheers, Ian

More information about the freebsd-questions mailing list