LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Determining Internet IP from behind firewall (https://www.linuxquestions.org/questions/linux-networking-3/determining-internet-ip-from-behind-firewall-143089/)

belorion 02-06-2004 03:46 PM

Determining Internet IP from behind firewall
 
Hi all. I am trying to figure out how to determine my router's "internet ip" address which it is assigned from my broadband provider.

To my local machine, it's IP is of course 192.168.1.1, but is there a way to determine the LAN's internet IP? I know that I can log into the router with a web browser to grab the information, but the reason I am doing this is to write a script which will notify me by email when my IP address has changed while I am away from home, so I can still login to my server.

Of course, the first solution which came to my mind was script which used the built in router http interface... but I don't know how the login/pasw info is passed to the router.

Any suggestions?

Belorion

david_ross 02-06-2004 03:53 PM

Try:
lynx -dump http://www.whatismyip.com | grep "Your IP is"

synaptical 02-06-2004 03:54 PM

if you mean what is the IP given to you by your ISP, try something like www.whatismyip.com or http://www.danasoft.com/

otherwise, i'm not really clear on what you're asking.

>edit: i just tried that lynx maneuver -- that is too slick. :D i've got to learn more about grepping and doing cool stuff like that from the command line. any pointers? :cool:

david_ross 02-07-2004 09:53 AM

synaptical, just check up the man pages. It's a good idea to do it bit by it. Don't try to write the whole command at once, write one part, test it, then pipe it into something else. Then at the end you can rationalise it a bit if needed.


All times are GMT -5. The time now is 01:11 AM.