Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

on FreeBSD i know i can use the route command to add a default gateway like this: route add default

but this does not save on a reboot. How can i get it to save?

share|improve this question
up vote 2 down vote accepted

To have your custom default gateway saved across reboots, you'll want to edit /etc/rc.conf. There is a directive in there called defaultrouter which is set to NO by default. The line looks like this:


open /etc/rc.conf in your editor of choice, find this line, and change NO to the IP address of the gateway so it looks like this:


this will be persistent across reboots.

share|improve this answer
Rebooting now, thanks. – The BSD Guy Dec 23 '09 at 21:53
Seems to have worked fine thank you again! – The BSD Guy Dec 27 '09 at 19:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .