Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2001 00:22:03 -0500
From:      David Kelly <dkelly@hiwaay.net>
To:        "Matthew Emmerton" <matt@gsicomp.on.ca>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: getting nat to refresh its rules 
Message-ID:  <200108290522.f7T5M3w74138@grumpy.dyndns.org>
In-Reply-To: Message from "Matthew Emmerton" <matt@gsicomp.on.ca>  of "Tue, 28 Aug 2001 23:04:59 EDT." <001301c13037$64fad820$1200a8c0@gsicomp.on.ca> 

next in thread | previous in thread | raw e-mail | index | archive | help
"Matthew Emmerton" writes:
> 
> However, I have one big beef with the current setup, and that is there is no
> easy way short of a reboot to get natd to re-read its configuration, as
> given by the -f option.  This means that if I add a new forwarding rule, I
> have to reboot the box to get natd to use its new configuration.

It would be nice if "kill -HUP `cat /var/run/natd.pid `" would cause it 
to refresh its rules. Something you could contribute in all the spare 
time those reliable FreeBSD firewalls will buy you.

You can restart natd something like this, even over an ssh link running
thru natd:

# ( sleep 2; kill -9 `cat /var/run/natd.pid`; /sbin/natd -f /etc/natd.conf ) >& /dev/null &

If between the first natd stopping and the next one starting your ssh 
link needs to send a packet then you'll lose the link. The above 
redirects stdout to protect against that happening.


-- 
David Kelly N4HHE, dkelly@hiwaay.net
=====================================================================
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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