Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A fix for shared dial-up connection issues UNIX
Hi, not sure whether this was posted already. I had problems sharing a dial-up (Modem) PPP connection. I want to use NAT for security reasons and found that only the first connection after reboot worked. Subsequent connects would fail due to NATD not rebinding the new PPP bindings. Restarting NATD fixed the problem. Luckily PPPD fires off some scripts in /etc/ppp depending on connection status. The following script restarts NATD after every successfull connect if you save it as /etc/ppp/ip-up (don't forget to make it executable):
#!/bin/sh - 
N_P=`ps -uxc -U root | grep ' natd$' | awk '{ print $2 }'`
if [ "$N_P" != "" ]; then
logger -i -t $0 "Sending SIGHUP to natd (PID $N_P)"
kill -HUP $N_P
In that script you can, of course, kick off other useful stuff you only want to happen if the link comes up (e.g. sending spooled mail).
  • Currently 1.50 / 5
  You rated: 1 / 5 (4 votes cast)

A fix for shared dial-up connection issues | 3 comments | Create New Account
Click here to return to the 'A fix for shared dial-up connection issues' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authored by: cram on Feb 12, '02 10:19:17AM

I have experienced the same problem since the day I used natd, and I am very pleased to have an answer... I'll try it as soon as I get home..

[ Reply to This | # ]
another easy way...
Authored by: JazzDude on Feb 12, '02 04:38:16PM

you can use Brickhouse to kill the NAT daemon... works flawlessly...

[ Reply to This | # ]
another easy way...
Authored by: torsten on Feb 13, '02 03:36:24AM

true ... but you would have to do it manually everytime PPP comes up. Kinda tedious. Doing it this way completely automates it.


[ Reply to This | # ]