IP - e-mail
Hi everybody, Let say my computer is connected to the internet with a cable modem and has a dynamic IP address via DHCP. This address is refreshed after every random days. I want to know the new address even when I'm not home. Like send an e-mail with the new IP, I already know how to do this, but how can I track the event when my computer receives the new IP? Any ideas or same issues? Thx! Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: IP - e-mail
El día Wednesday, June 06, 2012 a las 02:06:48AM -0700, Dánielisz László escribió: Hi everybody, Let say my computer is connected to the internet with a cable modem and has a dynamic IP address via DHCP. This address is refreshed after every random days. I want to know the new address even when I'm not home. Like send an e-mail with the new IP, I already know how to do this, but how can I track the event when my computer receives the new IP? Any ideas or same issues? Hi, Run this in a cronjob: lynx -dump myip.nl | fgrep 'WAN IP' strore the result in a file and when it changes, trigger a mail; HIH matthias -- Matthias Apitz e g...@unixarea.de - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: IP - e-mail
Matthias Apitz writes: Let say my computer is connected to the internet with a cable modem and has a dynamic IP address via DHCP. This address is refreshed after every random days. I want to know the new address even when I'm not home. Like send an e-mail with the new IP, I already know how to do this, but how can I track the event when my computer receives the new IP? Run this in a cronjob: lynx -dump myip.nl | fgrep 'WAN IP' strore the result in a file and when it changes, trigger a mail; Or, using only tools in the base system: ifconfig | head | grep inet | awk '{print $2}' Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: IP - e-mail
El día Wednesday, June 06, 2012 a las 09:17:47AM -0400, Robert Huff escribió: Run this in a cronjob: lynx -dump myip.nl | fgrep 'WAN IP' strore the result in a file and when it changes, trigger a mail; Or, using only tools in the base system: ifconfig | head | grep inet | awk '{print $2}' This will not work if your host has some private addr which is NAT'ed by a router; the real test is ask some remote side how I do apear to you? ofc you could do this as well by SSH'ing to some side and asking with netstat(1) there (which may be shows another NAT'ed addr too :-)) Trust me, the above lynx is the nearly only robust version. matthias -- Matthias Apitz e g...@unixarea.de - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: IP - e-mail
m From owner-freebsd-questi...@freebsd.org Wed Jun 6 07:37:57 2012 Date: Wed, 6 Jun 2012 02:06:48 -0700 (PDT) From: =?iso-8859-1?Q?D=E1nielisz_L=E1szl=F3?= laszlo_daniel...@yahoo.com To: freebsd-questions@freebsd.org freebsd-questions@freebsd.org Subject: IP - e-mail Hi everybody, Let say my computer is connected to the internet with a cable modem and h as a dynamic IP address via DHCP. This address is refreshed after every r andom days. I want to know the new address even when I'm not home. Like send an e-mai l with the new IP, I already know how to do this, but how can I track the event when my computer receives the new IP? Any ideas or same issues? Schedule a 'cron' job to run as frequently as you like. Have it: a) do an 'ifconfig -a', or maybe just check the 'interface of interest'. b) 'diff' that output against a 'reference' copy from the previous run c) send an email if diff reports differences d) save the ifconfig output for referene in the next run ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: IP - e-mail
-Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd- questi...@freebsd.org] On Behalf Of Robert Huff Sent: Wednesday, June 06, 2012 9:18 AM To: Matthias Apitz Cc: freebsd-questions@freebsd.org Subject: Re: IP - e-mail Matthias Apitz writes: Let say my computer is connected to the internet with a cable modem and has a dynamic IP address via DHCP. This address is refreshed after every random days. I want to know the new address even when I'm not home. Like send an e-mail with the new IP, I already know how to do this, but how can I track the event when my computer receives the new IP? If you are using it so you know what IP to hit from outside your network, I would also recommend taking a look at a service like DynDNS as you would have a DNS name that would auto correct for new IP. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: IP - e-mail
On Wed, 06 Jun 2012 09:11:02 -0500, Robert Bonomi bon...@mail.r-bonomi.com wrote: Matthias, your lynx-based 'solution' does *NOT* solve the OP's question. Incorrect; it does solve his problem. He wants to know -when- his DHCP assigned address changes. Consider what happens if both the expired address and the new address are behind the _same_ NAT translation. The internal addrress changes, but the external one does not. Please people, read carefully: His ISP is handing out his public IP via DHCP. This is normal for consumer internet connections. He doesn't care about his internal RFC 1918 IP which is handed out by his router's DHCP server; that's an easy problem to solve. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org