Re: Auto-notify remote user of IP address change?
On Tue, Mar 08, 2005 at 09:09:02PM +1000, David Powell wrote:
> My original thought was to somehow output the contents of whatismy.com
> to a text file (lynx www.whatismy.cop > .myip ??) and then grep that for
> the part with the IP address and mail the result. Is this possible or
> am I showing myself up as a hopeless newbie?
I was doing something similar until a friend pointed out that the url
of my dsl connection was identified in the email headers. Now I just
send an empty email to another host, and grab the address from the
headers. So you could do something like (sic)
$ lynx -dump www.whatismy.cop | mail -s ip you@someisp.com
but
$ mail < /dev/null -s ip you@someisp.com
might work as well. Of course this is far from having your ip listed
on a public dns, but it might be sufficient for getting access to the
hosts behind a dynamic address.
> David Powell wrote:
> >I'm installing a DB server into a clients office, and I want to be able
> >to set up remote ssh access to the box from home.
> >
> >The glitch is that the client's ADSL internet access has a dynamic IP
> > ...
> >
> >My setup at home is similar (though I've got linux desktops) and I I've
> >tried to get the IP address that the modem is assigned, but the only way
> >I've been able to is by visiting internet sites (like shields up) that
> >report that info back.
RFC822 defines the Received: header as being added by each relay handling
the message. Looking in your message, I can see that your local ip is
192.168.1.100, and also the public (if dynamic) address of your router.
And you thought you were safe behind a non-static address...
Ken
--
Ken Irving, Research Analyst, fnkci@uaf.edu, 907-474-6152
Water and Environmental Research Center
Institute of Northern Engineering
University of Alaska, Fairbanks
Reply to: