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.
osama1
Lance Naik
Posts: 33
Joined: Fri Jul 17, 2009 10:02 am

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.

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

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


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests