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 |
login to the router and it should have it listed.
|
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? |
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 |
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. |
|
All times are GMT -5. The time now is 09:34 PM. |