getting IP address of router

jim ruxton cinetron-uEvt2TsIf2EsA/PxXw9srA at public.gmane.org
Fri Feb 11 06:35:29 UTC 2005


Thanks Anton, No this router doesn't support SNMP. It's ok though
because others have pointed out alternative methods that seem to work.
Except I'm still having trouble figuring out why the following script
doesn't work properly for me where it does for other people. If anyone
has any suggestions why I'm eager to hear them.

# curl -s -o - http://www.myip.dk | sed  's%.* IP: \(.*\)</title>.*%\1%'

I'm using:

GNU sed version 4.0.8
curl 7.10.6 

My output should be :
65.229.223.184

but its:


65.229.223.184�</font><br>      <input type="text" name="ip"><br>      
<input type="submit"
value="Konverter"></form></center><p> <center><p><form
method="post" action="/CMyip.dll?DoReverseFormConvert2"
name="form1"><font size="2" face="Verdana">Skriv hostname'et du vil have
IP'en p�</font><br>   <input type="text" name="hostname"><br> <input
type="submit"
value="Konverter"></form></center><p> <center><p><form
method="post" action="/CMyip.dll?DoDecFormConvert" name="form1"><font
size="2" face="Verdana">Skriv IP'en du vil have lavet om til decimal
form:</font><br>    <input type="text" name="ip"><br>       <input
type="submit" value="Konverter"></form><br><br><br></center></body><!-- 
I Love you Eva B. Einarsdttir :)--></html>
Jim
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> jim ruxton wrote:
> | I'm sitting on a network behind a wireless Netgear router. Is there a
> | way to determine the routers dynamic internet IP address easily ie.
> | without going into the routers configuration menu?
> | Jim
> 
> I don't know if this applies to Netgear routers, but my Linksys router
> reports IP changes via the SNMP protocol. Perhaps doing a google search
> on "netgear router SNMP" will show you whether this is possible.
> 
> 
> [P.S. I am resending this message because the GPG signature failed (at
> least according to Thunderbird/Enigmail]
> 
> - --
> Anton Markov <("anton" + "@" + "truxtar" + "." + "com")>
> 
> GnuPG Key fingerprint =
> 5546 A6E2 1FFB 9BB8 15C3  CE34 46B7 8D93 3AD1 44B4
> 
> *** LINUX - MAY THE SOURCE BE WITH YOU! ***
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCDEboRreNkzrRRLQRAiKpAJ9WTjlYCLHH3FNBZ1CPW0hqT9JMdwCfRkyu
> 2PrRREs+/9Ll1fgjw+j39Tk=
> =IOVV
> -----END PGP SIGNATURE-----
> --
> The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
> 

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list