You are not logged in.

#1 2009-01-10 21:08:05

pinchyfingers
Member
From: Bristol, PA
Registered: 2008-11-04
Posts: 46
Website

Router's IP Address from shell

I'm sure this is a dumb question ... how can I find out my router's IP address from the shell? The only way I know how to do it now is by logging onto the router through the browser. I have a linksys WRT54GS, if that makes a difference. Thanks for the help.

Offline

#2 2009-01-10 21:15:15

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Router's IP Address from shell

A suppose you mean the IP addresses by which you can reach your router from the internet? From inside your lan:

wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1

You can get a dyndns account and let your router automatically update that (most of them can) for an easy to remember hostname.

Offline

#3 2009-01-10 21:19:21

pinchyfingers
Member
From: Bristol, PA
Registered: 2008-11-04
Posts: 46
Website

Re: Router's IP Address from shell

Awesome, thank you.

Offline

#4 2009-01-10 22:05:30

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Router's IP Address from shell

A simpler way:

$ curl www.whatismyip.org

Offline

Board footer

Powered by FluxBB