add permanent route

Daniel Bye dan at
Mon Apr 14 04:14:28 PDT 2003

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:


Any traffic for goes out through 

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:


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



Daniel Bye

PGP Key:
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 / \

More information about the freebsd-questions mailing list