getting IP address of router
Chris F.A. Johnson
cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Mon Feb 7 23:42:14 UTC 2005
On Mon, 7 Feb 2005, jim ruxton wrote:
> Thanks Chris. Along the same line..
> http://www.networksecuritytoolkit.org/nst/tools/check_ip.html
Incidentally, ipaddr.cgi contains:
#!/bin/sh
printf "Content-type: text/plain\n\n"
printf "%s\n" "$REMOTE_ADDR"
>> On Mon, 7 Feb 2005, jim ruxton wrote:
>>
>>> Date: Mon, 07 Feb 2005 15:34:45 -0500
>>> From: jim ruxton <cinetron-uEvt2TsIf2EsA/PxXw9srA at public.gmane.org>
>>> Reply-To: tlug-lxSQFCZeNF4 at public.gmane.org
>>> To: tlug-lxSQFCZeNF4 at public.gmane.org
>>> Subject: [TLUG]: getting IP address of router
>>>
>>> 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?
>>
>>
>> ip=$(wget -O - http://cfaj.freeshell.org/ipaddr.cgi 2>/dev/null)
>>
>> Or:
>>
>> ip=$(lynx -dump http://cfaj.freeshell.org/ipaddr.cgi)
>>
>>
>> Or probably something similar with curl.
>>
>>
>> Or use bash socket programming to do the same thing (I haven't tried
>> it, but it should work):
>>
>> exec 3<>/dev/tcp/cfaj.freeshell.org/80
>>
>> etc....
>
> --
> 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
>
--
Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
=================================================================
bq933-0l1pH2CMacvR7s880joybQ at public.gmane.org http://members.rogers.com/c.f.a.johnson
c.f.a.johnson-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org http://cfaj.freeshell.org
--
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