networking won't come back up until reboot after ISP outage

Michael Powell nightrecon at
Wed Nov 11 20:23:02 UTC 2009

umage wrote:

>> In my case the router does get the renewed ip, as I described earlier.
>> However, even after waiting 8+ hours, the system will not recover from
>> the outage properly (reason unknown). That's what this thread is all
>> about.
> When I started the system today, I found that again it had no
> connectivity. I did some checks and then found that 'natd' was not
> running. But this is not happening that frequently, and seems to only
> have started after the last system update. Could be some sort of race
> condition. Is there a logfile that natd writes to, so that I may
> investigate the reason why it is exiting?

My first gut instinct about your problem was to blame dhclient first. But no 
NATD would definitely be a problem. I am assuming we are talking about IPFW 
and NATD here, and it has been many years since I've used it. I migrated to 
IPFILTER and then on to PF quite some time ago.

Most logging related to IPFW is already present, but IIRC to log NATD you 
need to turn it on, and possibly configure it in syslog.conf should you 
desire the output somewhere other than /var/log/alias.log.

Keep in mind there are two ways to pass options. You can use something like 
natd_flags="-l" in /etc/rc.conf. Man natd will provide a list. The second 
method is to place the options in a file such as natd.conf and pull them in 
like natd_flags="-f /etc/natd.conf".

I looked in my notes and here is a snippet from an old /etc/rc.conf:

natd_flags="-f /etc/natd.conf"

My /etc/natd.conf:

interface ppp0
use_sockets yes
same_ports yes
dynamic yes

You could add a 'log yes' line here; it does the same as the -l described 
above. Note that you might need the 'dynamic yes' switch for an interface 
that changes. In my case I was using it for a ppp dial-up connection, change 
interface as needed.

Sounds like you are narrowing down the culprit(s). Also note that it could 
possibly be a timing issue related to the order things start up. If the NATD 
is attempting to start before the interface has come up it will die. 
Shouldn't happen, but...   YMMV


More information about the freebsd-questions mailing list