From owner-freebsd-newbies@FreeBSD.ORG Fri Jan 14 06:03:35 2005 Return-Path: Delivered-To: freebsd-newbies@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4A9B16A4CE for ; Fri, 14 Jan 2005 06:03:35 +0000 (GMT) Received: from asclepius.uwa.edu.au (asclepius3.uwa.edu.au [130.95.128.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFFE243D45 for ; Fri, 14 Jan 2005 06:03:34 +0000 (GMT) (envelope-from zanchey@mussel.ucc.gu.uwa.edu.au) Received: from asclepius.kas (localhost.localdomain [127.0.0.1]) by asclepius.uwa.edu.au (Postfix) with SMTP id 52EC0183F89 for ; Fri, 14 Jan 2005 14:03:33 +0800 (WST) Received: from asclepius (localhost.localdomain [127.0.0.1]) by asclepius.prekas (Postfix) with SMTP id 3740E184A41 for ; Fri, 14 Jan 2005 14:03:33 +0800 (WST) X-UWA-Client-IP: 130.95.13.9 (UWA) Received: from mooneye.ucc.gu.uwa.edu.au (mooneye.ucc.gu.uwa.edu.au [130.95.13.9]) by asclepius.input (Postfix) with ESMTP id 104A8183F89 for ; Fri, 14 Jan 2005 14:03:33 +0800 (WST) Received: by mooneye.ucc.gu.uwa.edu.au (Postfix, from userid 801) id 5898917F3F; Fri, 14 Jan 2005 14:03:32 +0800 (WST) Received: from mussel.ucc.gu.uwa.edu.au (mussel.ucc.gu.uwa.edu.au [130.95.13.18]) by mooneye.ucc.gu.uwa.edu.au (Postfix) with ESMTP id D837017E9B; Fri, 14 Jan 2005 14:03:31 +0800 (WST) Received: from zanchey (helo=localhost) by mussel.ucc.gu.uwa.edu.au with local-esmtp (Exim 3.36 #1 (Debian)) id 1CpKYV-0004lk-00; Fri, 14 Jan 2005 14:03:31 +0800 Date: Fri, 14 Jan 2005 14:03:31 +0800 (WST) From: David Adam To: Brian John In-Reply-To: <3296.209.87.176.132.1105652323.fusewebmail-19592@www.fusemail.com> Message-ID: References: <41E5C873.4030401@fusemail.com> <200501130821.52869.merv@merv.org.uk> <3296.209.87.176.132.1105652323.fusewebmail-19592@www.fusemail.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1602359821-863134493-1105682611=:16100" Sender: David Adam X-SpamTest-Info: Profile: Formal (192/041231) X-SpamTest-Info: Profile: Detect Hard [UCS 290904] X-SpamTest-Info: Profile: SysLog X-SpamTest-Info: Profile: Marking Spam - Subject (UCS) [02-08-04] X-SpamTest-Status: Not detected X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release cc: freebsd-newbies@freebsd.org cc: merv Subject: Re: Need to monitor when IP Address changes X-BeenThere: freebsd-newbies@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Gathering place for new users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2005 06:03:35 -0000 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: Content-Description: ip-watch-script Content-Disposition: attachment; filename=scriptfile IyEgL2Jpbi9zaA0KIyMjDQojIFNjcmlwdCB0byB3YXRjaCBmb3IgSVAgYWRk cmVzcyBjaGFuZ2VzIGFuZCBtYWlsIHdoZW4gdGhleSBoYXBwZW4NCiMgV2ls bCBwZXJmb3JtLi4uIHVtLCB1bnByZWRpY3RhYmx5LCB3aXRoIG11bHRpcGxl IElQIGFkZHJlc3NlcyBwZXIgaW50ZXJmYWNlDQojIFdyaXR0ZW4gSmFudWFy eSAyMDA1IGJ5IERhdmlkIEFkYW0gKHphbmNoZXlAdWNjLmd1LnV3YS5lZHUu YXUpDQoNCiMjIyBDSEFOR0UgVEhFU0UgVkFSSUFCTEVTIQ0KIyBJbnRlcmZh Y2UgdG8gd2F0Y2gNCklGQUNFPSJ4bDAiDQojIEZpbGUgdG8gdXNlDQpJUEZJ TEU9Ii92YXIvdG1wL2lwZmlsZSINCiMgQWRkcmVzcyB0byBtYWlsDQpFQURE UkVTUz0iemFuY2hleUB1Y2MuZ3UudXdhLmVkdS5hdSINCg0KIyBHZXQgY3Vy cmVudCBJUA0KDQpDVVJSRU5UX0lQPSQoaWZjb25maWcgJElGQUNFIHxncmVw IC1tIDEgImluZXQgIiB8YXdrICd7cHJpbnQgJDJ9JyApDQoNCmlmIFsgISAt ZiAkSVBGSUxFIF07IHRoZW4NCiAgdG91Y2ggJElQRklMRQ0KICBlY2hvICRD VVJSRU5UX0lQID4gJElQRklMRSAgDQpmaQ0KDQojIEdldCBwcmV2aW91cyBJ UA0KDQpQUkVWSU9VU19JUD0kKGNhdCAkSVBGSUxFKQ0KDQojZWNobyAiUHJl dmlvdXMgSVAgd2FzICRQUkVWSU9VU19JUCINCg0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