Finding the external IP on a DSL router?

Anthony E. Greene tony at greene-family.org
Wed Nov 24 09:58:07 UTC 2004


On 23-Nov-2004/20:19 -0800, Pete Nesbitt <pete at linux1.ca> wrote:
>On November 23, 2004 07:58 pm, Edward wrote:
>>
>> Just a side note Pete - I'm by no means a scripter, but where does the
>> above script find the router's external IP address?
>>
>
>
>Hi Ed,
>You raise some interesting questions. This may come down to which DSL 
>technology is in place.
>
>My DSL connection (always-on) comes in to a DSL modem (telco provided) that 
>has a 10 Mb Ethernet port on the inside. That feeds  into a Linux box which 
>has 3 nics (InterNet, LAN, DMZ) and acts as a fireqwall/gateway. If it is a 
>hardware router, well then that is a different story, I guess I always 
>presume Linux:-) 

A modem only provides a path to the NIC on the computer and you can find
the address of the NIC with ifconfig. But a router has it's own IP and
provides 192.168.*.* DHCP to the internal network. The router's external
IP is not visible to ifconfig.

Tony
-- 
Anthony E. Greene <mailto:Anthony%20E.%20Greene%20%3Ctony at greene-family.org%3E>
AOL/Yahoo Messenger: TonyG05    HomePage: <http://www.greene-family.org/tony/>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
Linux. The choice of a GNU generation <http://www.linux.org/>




More information about the redhat-list mailing list