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

Determine IP of Gateway router Internet side NIC

Post by osama1 »

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

Post by LinuxFreaK »

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
Post Reply