D
D
Dmitry2010-10-08 10:06:51
FreeBSD
Dmitry, 2010-10-08 10:06:51

Informing about the successful connection of a PPPoE client on FreeBSD?

There is a server on FreeBSD, going to the Internet via PPPoE. When connected, he is given an honest IP address, but each time it is different. I screwed up the inadyn DynDNS client and everything seems to be fine, but for some reason one out of ten inadyn does not work and the server remains unavailable until the next reconnection (or even reboot).
Is it possible to send a PPPoE connection notification to the soap every time you connect? Naturally, this notification would also contain the received IP.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lless, 2010-10-08
@lless

old=`cat ip`
new=`ifconfig -L tun0 | grep inet | awk '{ print $2 }'`
echo $new > ip
if [ "$old" = "$new" ]
then
        echo ok!
else
        echo $new | mail -s "NewIP" username
        echo bad!
fi

1. like this in the cron…
2. mpd4: set iface up-script /usr/local/etc/mpd4/io-up-pppoe.sh then you can put
ppp into this script, I don't remember if there is a startup script.

S
Spamkit, 2010-10-08
@Spamkit

Sometimes I came across the fact that the DynDNS update HTTP request did not go through. I scored for an update when the interface was raised, and now every 10 minutes I check the change of IP by the crown. If it does not match the DynDns provided, please update. Tools: bash, wget, grep, sed, tr, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question