Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2003 12:14:19 +0100
From:      Daniel Bye <dan@slightlystrange.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: add permanent route
Message-ID:  <20030414111419.GA40512@catflap.home.slightlystrange.org>
In-Reply-To: <20030414125318.C5CC.FREEBSD@euro.net.mk>
References:  <20030414125318.C5CC.FREEBSD@euro.net.mk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 14, 2003 at 01:01:42PM +0200, Perica Veljanovski wrote:
> How do I make a "route add" permanent (meaning that the static route
> will remain when I reboot) ?

Something like this in /etc/rc.conf will work:

static_routes="example"
route_example="-net 10.0.0.0 192.168.7.2"

Any traffic for 10.0.0.0/8 goes out through 192.168.7.2. 

Using this alias format, you can add as many static routes as you need.

> How do I set "sysctl net.inet.ip.forwarding=1" in the kernel?  I cant
> seem to find the the option to set ip.forwarding in the kernel.

You can either set "gateway_enable=yes" in /etc/rc.conf, or put the 
following in /etc/sysctl.conf:

net.inet.ip.forwarding=1

/etc/sysctl.conf is read as the machine goes multi-user, and can be used to
configure many sysctls.

HTH,

Dan

-- 
Daniel Bye

PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc
PGP Key fingerprint: 3D73 AF47 D448 C5CA 88B4 0DCF 849C 1C33 3C48 2CDC
                                                                     _
                                              ASCII ribbon campaign ( )
                                         - against HTML, vCards and  X
                                - proprietary attachments in e-mail / \



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