[YLUG] Finding the external IP of a linksys router

Craig Genner craig at gennerfam.freeserve.co.uk
Mon May 22 15:32:43 BST 2006


On Monday 22 May 2006 14:58, Stephen wrote:
> Hi All
>
> I've recently redone my network a bit to replace the long cable run from
> the ntl cable box downstairs to my linux server/router/firewall upstairs
> with a linksys WRT54G wireless router & a dlink wireless access point
> (which oddly enough works pretty well).
>
> The downside of this is that I have 2 totally different dyndns
> hosts (which the linux router used to be able to update) but the linksys
> can only update 1 host, so I'd like to be able to get the linksys's
> external IP via a script which I can then use to update both dyndns
> hostnames. Any ideas?
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`

Craig

-- 
PGP Public Key - http://www.tuxx.homelinux.org/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.lug.org.uk/pipermail/york/attachments/20060522/39daf1c5/attachment.bin


More information about the York mailing list