![]() |
|
P is for Practical | |
PerlMonks |
Re: Nagios plugin to detect changed IP address of WRT54G router. - TIMTOWTDIby tmiklas (Hermit) |
on Feb 27, 2006 at 14:26 UTC ( #533025=note: print w/replies, xml ) | Need Help?? |
Hmmm - very nice code and perl usage at all BIG ++ ... but to get the same result you don't have to run such 'combinations'... maybe i should not write this as this is Perlmonks but using Perl should make our life easier... and sometimes not-using Perl does the same :-/ Fast and tested solution... register yourself with dyndns or no-ip system or anything like this (it's free)... and set your DNS properly: then point the MX to the same host (as shown above)... all of the systems provide free tools for updating it's entries... and to do it Perl-ish way, use Net::DNS::DynDNS :-) The task now is to get the information about IP change no later than a few seconds after it has changed... without constantly querying the router or blindly updating the dns database without checking if it was necesery. Eventually your host will be inaccessible for some time (but anyway much shorter than waiting for the ISP staff to change the DNS entries and reload configuration). I hope i won't get downvoted (too much) for describing non-Perl solution, hehe...
Greetz, Tom.
In Section
Cool Uses for Perl
|
|