Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-22-2003, 07:04 PM   #1
Registered: May 2003
Posts: 34

Rep: Reputation: 15
IP address of broadband router...


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.

Old 12-22-2003, 07:24 PM   #2
Registered: Sep 2003
Location: Springfield Ma.
Distribution: Mandrake 9.2,Knoppix 3.7,Slackware 10.0, FreeBSD. 5.3, OpenBSD 3.6, NetBSD 2.0, Debian
Posts: 275

Rep: Reputation: 30
login to the router and it should have it listed.
Old 12-22-2003, 07:38 PM   #3
Registered: May 2003
Posts: 34

Original Poster
Rep: Reputation: 15
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?
Old 12-22-2003, 08:08 PM   #4
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
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
Old 12-23-2003, 12:23 PM   #5
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
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.
Old 12-31-2003, 03:47 PM   #6
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
try here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
No sync with Conexant broadband router tkendall Linux - Networking 0 07-24-2005 06:49 AM
Wireless-G Broadband Router with SpeedBooster i need a card? OMEGA-DOOM Linux - Hardware 0 10-08-2004 11:27 AM
Broadband Router glyndwr Linux - Hardware 12 07-14-2004 04:02 PM
Connect multiple computers behind a broadband router timyaukey Linux - Networking 4 07-03-2004 08:44 AM
Broadband router/switch jasonk General 4 12-15-2003 06:08 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration