Determine IP of Gateway router Internet side NIC

Discussion of programming on Linux, including shell scripting, perl, python, c/c++, mono, java. Whatever tickles your fancy.

Determine IP of Gateway router Internet side NIC

Postby osama1 » Tue Dec 01, 2009 4:02 pm

Hello, Is there any way to determine IP address of a linux router without logging in to it. I mean I am on a network connected to a DSL router. I know the IP of Gateway machine connected to LAN. I want to know the REAL IP which connects router to Internet. I want to use that IP in a script. whatismyip.com is not required.

I want command or script like traceroute.
osama1
Lance Naik
 
Posts: 33
Joined: Fri Jul 17, 2009 10:02 am

Re: Determine IP of Gateway router Internet side NIC

Postby LinuxFreaK » Mon Dec 07, 2009 1:47 pm

Dear osama1,
Salam,

osama1 wrote:Hello, Is there any way to determine IP address of a linux router without logging in to it. I mean I am on a network connected to a DSL router. I know the IP of Gateway machine connected to LAN. I want to know the REAL IP which connects router to Internet. I want to use that IP in a script. whatismyip.com is not required.

I want command or script like traceroute.


I hope below command will help you out.

`lynx --dump http://ip.xten.net`

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi


Return to “%s” Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron