[YLUG] Finding the external IP of a linksys router

Craig Genner craig at gennerfam.freeserve.co.uk
Mon May 22 19:09:31 BST 2006


On Monday 22 May 2006 18:49, Martin Rowe wrote:
> On 22/05/06, Craig Genner <craig at gennerfam.freeserve.co.uk> wrote:
> [snip]
>
> > The following in a script:
> >
> > curr_ip=`wget -q -O- http://www.whatismyip.com/ | grep "Your IP is " - |
> > cut -d" " -f4`
> >
> > or
> >
> > curr_ip=`wget -q -O- http://www.gene6.com/ip.php`
>
> That's useful to know, as I'm in the same boat as Stephen with a
> couple of dyndns account but only a slot for one in my wireless router
> (KCorp KLG-575). Unfortunately the second url isn't much use for ntl
> users, as it returns the address of the transparent proxy ntl provide.
> Quite a few web sites I've visited do they same, though dyndns.org &
> whatismyip.com seem to have no trouble getting through that to the
> correct one.
>
> Regards, Martin
Hmm, seems that I pasted some code that doesn't quite work.  The first one 
should really be:

wget -q -O- http://www.whatismyip.com/ | grep "Your IP Is " -| cut -d" " -f4 | 
cut -d"<" -f1

Craig




More information about the York mailing list