Date: Fri, 14 Jan 2005 14:03:31 +0800 (WST) From: David Adam <zanchey@ucc.gu.uwa.edu.au> To: Brian John <brianjohn@fusemail.com> Cc: merv <merv@merv.org.uk> Subject: Re: Need to monitor when IP Address changes Message-ID: <Pine.LNX.4.58.0501140856100.12638@mussel.ucc.gu.uwa.edu.au> In-Reply-To: <3296.209.87.176.132.1105652323.fusewebmail-19592@www.fusemail.com> References: <41E5C873.4030401@fusemail.com> <200501130821.52869.merv@merv.org.uk> <3296.209.87.176.132.1105652323.fusewebmail-19592@www.fusemail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --1602359821-863134493-1105682611=:16100 Content-Type: TEXT/PLAIN; charset=US-ASCII > That's awesome. Very simple. Now how could I have it figure out if the > IP address has actually changed? I only want it to email me if it > changes. Sorry, I'm very fluent in Windows but have only been using > FreeBSD for a couple of days. Hi Brian, Although you're getting a lot of people telling you to go with the dyndns, I think that you're probably doing the right thing from a simplicity point of view. I had no end of trouble getting the No-IP client running under FreeBSD (although that may have a lot to do with the crappiness of my ISP, and their bizarre cable login program). I think what you want to do is schedule a cronjob (like a Scheduled Task or at command on Windows) to run a script that looks something like the attached. Make sure you change the variables at the top: Change the line that says IFACE="xl0" to set the interface you are watching. Change the line that says IPFILE="/var/tmp/ipfile" to something that the user you are running cron as will have access to (should be ok there). Change the line that says EADDRESS="zanchey@ucc.gu.uwa.edu.au" to use your e-mail address. I don't want your IP updates :-) If you need help learning how to schedule a cron job, ping the list again and one of us should be able to help out. (Incidentally, this won't run on 4.x, as it requires the -m option to grep in order to avoid choking on interfaces with more than one IP. I'm sure there's a way around this using awk or something.) HTH, David Adam zanchey@ucc.gu.uwa.edu.au --1602359821-863134493-1105682611=:16100 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=scriptfile Content-Transfer-Encoding: BASE64 Content-ID: <Pine.LNX.4.58.0501141403310.16100@mussel.ucc.gu.uwa.edu.au> Content-Description: ip-watch-script Content-Disposition: attachment; filename=scriptfile IyEgL2Jpbi9zaA0KIyMjDQojIFNjcmlwdCB0byB3YXRjaCBmb3IgSVAgYWRk cmVzcyBjaGFuZ2VzIGFuZCBtYWlsIHdoZW4gdGhleSBoYXBwZW4NCiMgV2ls bCBwZXJmb3JtLi4uIHVtLCB1bnByZWRpY3RhYmx5LCB3aXRoIG11bHRpcGxl IElQIGFkZHJlc3NlcyBwZXIgaW50ZXJmYWNlDQojIFdyaXR0ZW4gSmFudWFy eSAyMDA1IGJ5IERhdmlkIEFkYW0gKHphbmNoZXlAdWNjLmd1LnV3YS5lZHUu YXUpDQoNCiMjIyBDSEFOR0UgVEhFU0UgVkFSSUFCTEVTIQ0KIyBJbnRlcmZh Y2UgdG8gd2F0Y2gNCklGQUNFPSJ4bDAiDQojIEZpbGUgdG8gdXNlDQpJUEZJ TEU9Ii92YXIvdG1wL2lwZmlsZSINCiMgQWRkcmVzcyB0byBtYWlsDQpFQURE UkVTUz0iemFuY2hleUB1Y2MuZ3UudXdhLmVkdS5hdSINCg0KIyBHZXQgY3Vy cmVudCBJUA0KDQpDVVJSRU5UX0lQPSQoaWZjb25maWcgJElGQUNFIHxncmVw IC1tIDEgImluZXQgIiB8YXdrICd7cHJpbnQgJDJ9JyApDQoNCmlmIFsgISAt ZiAkSVBGSUxFIF07IHRoZW4NCiAgdG91Y2ggJElQRklMRQ0KICBlY2hvICRD VVJSRU5UX0lQID4gJElQRklMRSAgDQpmaQ0KDQojIEdldCBwcmV2aW91cyBJ UA0KDQpQUkVWSU9VU19JUD0kKGNhdCAkSVBGSUxFKQ0KDQojZWNobyAiUHJl dmlvdXMgSVAgd2FzICRQUkVWSU9VU19JUCINCg0KaWYgWyAiJENVUlJFTlRf SVAiICE9ICIkUFJFVklPVVNfSVAiIF07IHRoZW4NCiMgICBlY2hvICJJUHMg YXJlIGRpZmZlcmVudCEiDQojICAgZWNobyAiQ3VycmVudCBJUCBpcyAkQ1VS UkVOVF9JUCINCiAgIG1haWwgLXMgIklQIENoYW5nZTogJENVUlJFTlRfSVAi ICAkRUFERFJFU1MgPDwgRU9NDQpUaGUgSVAgb2YgeW91ciBzeXN0ZW0gaGFz IGNoYW5nZWQgZnJvbSAkUFJFVklPVVNfSVAgdG8gJENVUlJFTlRfSVAuDQpF T00NCmZpDQoNCmVjaG8gIiRDVVJSRU5UX0lQIiA+ICRJUEZJTEUNCg== --1602359821-863134493-1105682611=:16100--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.58.0501140856100.12638>