This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Know new ISP IP after remote reboot?!

Hi all!

Remote reboot fine, but how do i get to know the new ip after reconnection?
Is there a way to work that?
Anyone any ideas?

Thx,
have a nice day 


This thread was automatically locked due to age.
Parents
  • I wrote this for 3.x, so it may take a little tweaking to work in 4.x.  It will email the admin users  anytime the ip of the set interface changes.  

    create a new file called /etc/crontab.ip (this is all on one line)

    0 * * * * root CIP=`/sbin/ifconfig ppp0 | grep inet | awk '{print $2}' | sed 's/^addr://g'`;LIP=`cat /tmp/lastip`;if test "$CIP" != "$LIP"; then echo $CIP>/tmp/lastip; for addr in `cat /etc/adminmail`; do /usr/local/bin/anotifier "IP Address Change" /tmp/lastip $addr; done; fi    
Reply
  • I wrote this for 3.x, so it may take a little tweaking to work in 4.x.  It will email the admin users  anytime the ip of the set interface changes.  

    create a new file called /etc/crontab.ip (this is all on one line)

    0 * * * * root CIP=`/sbin/ifconfig ppp0 | grep inet | awk '{print $2}' | sed 's/^addr://g'`;LIP=`cat /tmp/lastip`;if test "$CIP" != "$LIP"; then echo $CIP>/tmp/lastip; for addr in `cat /etc/adminmail`; do /usr/local/bin/anotifier "IP Address Change" /tmp/lastip $addr; done; fi    
Children
No Data