The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 restart natd remotely?
Author: cappy 
Date:   25-10-00 05:08

Hello everyone! I'm wondering if anyone could help me. I've been trying to figure this one out for the longest time: restarted natd remotely.

Sometimes I change natd's config file (e.g., add new port redirections) and I'm logged in remotely (i.e., via ssh). I've tried killall -1 natd, however that doesn't cause natd to reread it's config file, it just restarts the daemon only. I've to start a new session of natd then kill the old session, but that just hangs the connection. I've read the archives of the freebsd-questions mailing list, but they lack any specifics. Can anyone provide step-by-steps to get natd to reread it's config file remotely?

Much thanx in advance.


Reply To This Message
 
 RE: restart natd remotely?
Author: Kyp 
Date:   25-10-00 16:35

killall -HUP natd works.
or kill -HUP `cat /var/run/natd.pid`

sound better?

Reply To This Message
 
 RE: restart natd remotely?
Author: cappy 
Date:   25-10-00 16:58

No that doesn't. I just posted that -1 didn't work. -HUP is the same as -1. As I said earlier, -1 doesn't cause natd to reread it's config file, it just restarts the daemon. Plus, I can't seem to kill natd remotely (i.e., via ssh).



Reply To This Message
 
 RE: restart natd remotely?
Author: cappy 
Date:   25-10-00 17:13

I've figured it out! Actualy, a friend of mine helped me figured it out (thanx Chris :-) and he's a linux guy! hah! Anywayz, here it is if anyone is interested:

killall natd ; sleep 11 ; /sbin/natd -f /etc/natd.conf

Of course you should point it to your natd configuration file. Also, you can even set the sleep to 10, because it takes natd 10 secs before it terminates. However, don't set it less, or the connect will be dropped.


Reply To This Message
 
 RE: restart natd remotely?
Author: Kyp 
Date:   25-10-00 17:22

ahhh... IC :o)
easy enough.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org