Answer the question
In order to leave comments, you need to log in
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
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
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 questionAsk a Question
731 491 924 answers to any question