LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-06-2004, 04:46 PM   #1
belorion
Member
 
Registered: Aug 2003
Distribution: Slackware 10.0
Posts: 124

Rep: Reputation: 16
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
 
Old 02-06-2004, 04:53 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Try:
lynx -dump http://www.whatismyip.com | grep "Your IP is"
 
Old 02-06-2004, 04:54 PM   #3
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 47
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. i've got to learn more about grepping and doing cool stuff like that from the command line. any pointers?

Last edited by synaptical; 02-06-2004 at 05:00 PM.
 
Old 02-07-2004, 10:53 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining internet speed LinuxLala Linux - Networking 2 09-13-2005 09:37 PM
Configuring firewall and internet sharing Ram2 Linux - Newbie 1 03-30-2005 12:27 AM
Firewall on - internet off. wellington Linux - Security 2 01-31-2005 04:50 PM
firewall blocking internet k4zau Linux - Networking 1 09-24-2004 03:18 PM
Internet connection sharing with Firewall steve1401 Linux - Networking 0 06-30-2003 11:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration