finding my own ip
James Knott
james.knott-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Thu Dec 27 23:22:48 UTC 2007
Jamon Camisso wrote:
> On December 27, 2007 10:52:05 Peter Smerdon wrote:
>
>> Hello Everyone and seasons greetings..
>>
>> My job takes me on the road a lot, but I like to keep my server
>> running so I can ssh into it from anywhere I happen to be. This way
>> my email and newsgroups for example are all in one location.
>>
>> The problem is my IP address is dynamic and dsl, every few days it
>> changes. My isp (magma.ca) used to provide a webpage that I could see
>> what my current IP is but now that Primus bought them, this page has
>> gone and I have no way of knowing what my IP at home is.
>>
>> My solution was to set a cron job to use curl and the website
>> `whatismyip.com' to email the IP address to my throwaway yahoo.ca
>> address.
>>
>> ,----[ crontab ]
>>
>> | */60 * * * * /usr/bin/curl
>> | http://www.whatismyip.com/automation/n09230945.asp >>
>> | /home/peter/cronlog 2>&1 | mail -s my-ip petersmerdon-FFYn/CNdgSA at public.gmane.org
>>
>> `----
>>
>> This seems to work, once an hour I get an email in my yahoo inbox
>> containing my IP but I am wondering if there is a `proper' way to do
>> this? It just seems like a bit of a kludge to rely on an outside
>> website. I use a netgear wireless router at home which I cannot ssh
>> into directly, and ifconfig only shows ip's from my internal network
>> so I wasn't sure how else to find my internet address without using
>> an external service like that website.
>>
>> thoughts?
>>
>
> On Fedora and Debian, check out the ez-ipupdate tool, it works with 10+
> dynamic dns providers. With that you just ssh to you.dnsprovider.com I
> have the equivalent setup to run on my router's firmware and it is the
> easiest and most convenient way to keep up to date with your ip.
>
> You could setup curl to login to and scrape the IP from the netgear
> interface too, but having a subdomain is easier to remember and you
> don't have to check your email first.
>
> There is also an External IP plugin for Firefox, but it just uses one of
> those 10+ external websites ez-ipupdate uses anyways.
>
> Jamon
>
I seem to be missing a couple of messages in this thread, so I didn't
see the OP. However, I use this script in KDE to display the address.
It requires Lynx.
#! /bin/sh
kdialog --msgbox "$(lynx --dump "http://checkip.dyndns.org/")"
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list