LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IP address of broadband router... (https://www.linuxquestions.org/questions/linux-networking-3/ip-address-of-broadband-router-128215/)

lnxkido 12-22-2003 07:04 PM

IP address of broadband router...
 
Hi,

I use DSL (SBC-YAHOO) to connect to the NET from my home m/c (Red Hat 8.0). I also have broadband router so that I can share the connection with my LAPTOP (Win2K).... I _DO_NOT_ have static IP and connect to the NET via DHCP.


How do I know the public IP address that gets assigned to my router?

Mind U, I know the private IP addr (192.168.x.y) but am looking for a mechanism/command/script etc. to figure out the external/public IP address that gets assigned to my router?

any help will be appreciated.

TIA,
LnxKido

mysterio 12-22-2003 07:24 PM

login to the router and it should have it listed.

lnxkido 12-22-2003 07:38 PM

THX Mysterio.

Oh yeah I can do that..but I am looking for some script/command that I can run from my desktop PC (Red Hat 8.0) to know that...

Is there such command/script or any available mechanism that will allow me to know my external IP address from my desktop m/c running RH 8.0?

chort 12-22-2003 08:08 PM

Well you could use wget or curl and specify a lot of command line options, then parse the resulting file that is downloaded.

$ man wget
$ man curl

BrianK 12-23-2003 12:23 PM

we had one of the computers on our internal network access an incorrect webpage somewhere on the internet (every five minutes or so) where we were able to check the weblogs & had a script on that website that would return the ip address of the request for that particular page. Using that method, you can be anywhere and run the script - it will return the ip of the router & then just portmap 22 (or whatever) to go to your incoming computer.

If you don't have access to the error logs, depnding on the router, you may be able to use lynx or telnet to parse out the WAN address of the router every so often and post it on the web somewhere.

mossy 12-31-2003 03:47 PM

try here:
www.whatismyip.com
www.whatismyip.org


All times are GMT -5. The time now is 09:34 PM.