There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Networking
Tag Cloud
adware audio bios blue screen boot bsod computer crash dell driver email error excel firefox freeze freezing google hard drive hardware hijackthis install internet laptop linux malware network no sound outlook problem reboot router screen server slow sound speakers spyware startup trojan usb video virus vista vundo webcam windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Networking >
WAN IP from DSL modem

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
tk_'s Avatar
tk_ tk_ is offline
Junior Member with 5 posts.
 
Join Date: Jan 2007
Experience: Intermediate
04-Sep-2007, 02:26 PM #1
Question WAN IP from DSL modem
Hello,
I have an Actiontec GT701 DSL modem. My Internet service requires that the WAN side of the modem be set to DHCP, hence the reason I'm posting this question.

I'm looking for a way to get the WAN IP address (not the LAN) of the modem, since it changes irregularly.

I know I can type in the LAN IP address of the modem and view the IP address on the modem's web page, but I need to be able to get it in text form that I can then either email or FTP it somewhere (i.e. to me at another location). Right now, getting the IP in a text format is the hard part.

I'm hoping for either a script or small program that is simple (and free).

Anyone have any ideas?
Thanks,
tk
TerryNet's Avatar
Computer Specs
Moderator with 26,861 posts.
 
Join Date: Mar 2005
Location: Ottawa, IL
Experience: Intermediate to Advanced
04-Sep-2007, 05:31 PM #2
I don't know of a script or program, but how about the following for a work around until you find one.

Just email to yourself at the other location. When you read the email look at the full headers and you should find the IP address of the sending computer.
tk_'s Avatar
tk_ tk_ is offline
Junior Member with 5 posts.
 
Join Date: Jan 2007
Experience: Intermediate
04-Sep-2007, 05:52 PM #3
Quote:
Originally Posted by TerryNet
Just email to yourself at the other location. When you read the email look at the full headers and you should find the IP address of the sending computer.
Interesting, and true, it does show the IP.

Here's my problem, though. I'm not physically at the location of the Actiontec modem I'm trying to get the WAN IP address of.
This is why I'm looking for a script or program that I can schedule to run fairly often to get/check the WAN IP address, and automagically either send it or put it somewhere I can get to from the Internet.

The email idea is interesting and has me thinking. Any other ideas based on what I said above?

Thanks for the idea, too.
tk
TerryNet's Avatar
Computer Specs
Moderator with 26,861 posts.
 
Join Date: Mar 2005
Location: Ottawa, IL
Experience: Intermediate to Advanced
04-Sep-2007, 07:25 PM #4
Most people with this issue would use something like (free) Dynamic DNS: http://www.dyndns.com/services/dns/dyndns/

I've never had a need for it, but I understand it works very well.
JohnWill's Avatar
Computer Specs
Moderator with 95,979 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
04-Sep-2007, 10:45 PM #5
Works for me.
tk_'s Avatar
tk_ tk_ is offline
Junior Member with 5 posts.
 
Join Date: Jan 2007
Experience: Intermediate
04-Sep-2007, 11:36 PM #6
@TerryNet: I agree, probably most people would do the free dynamic DNS. I'm avoiding that because I don't want to open more things up etc. on my firewall, plus I am trying to avoid giving that kind of information to a third party that, although probably is on the up and up, I don't know.

Honestly, I'm not trying to be difficult. I am really hoping there is a way to do this the way I'd really like to do it --running something locally on my PC that can detect the WAN IP of the DSL modem being used to get to the Internet, and then putting that information somewhere I can get to it remotely. I'm looking for a script or program type solution (running locally) so that I can compare the current IP to the last one, see if it has changed, and then only let me know if and when that has happened. Constantly sending emails adds a layer of maintenance because then I have a) sift through the emails to find the change(s), and b) monitor that email box so it doesn't pile the emails up.

You guys have given me two really good ideas, and I really appreciate them. I'm still interested in other ideas anyone might have, too.

Thanks,
tk
JohnWill's Avatar
Computer Specs
Moderator with 95,979 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
05-Sep-2007, 08:30 AM #7
DynDNS doesn't open any ports on your firewall.

You're going to have to use something like the DynDNS service, if you could do it locally, there'd be no reason for such services to exist.
coulterp's Avatar
Senior Member with 1,625 posts.
 
Join Date: Oct 2003
Location: Surrey, UK
Experience: Advanced, but always ready to learn more!
05-Sep-2007, 08:50 AM #8
Quote:
Originally Posted by tk_
...
I'm looking for a way to get the WAN IP address (not the LAN) of the modem, since it changes irregularly.

I know I can type in the LAN IP address of the modem and view the IP address on the modem's web page, but I need to be able to get it in text form that I can then either email or FTP it somewhere (i.e. to me at another location). Right now, getting the IP in a text format is the hard part.

I'm hoping for either a script or small program that is simple (and free).
...
Were you to be running Linux the script is a one-liner! And is about as simple, and free, as you can get!

Code:
wget -qO - http://whatismyip.org/
This can be adapted in a sh script to do most anything you could want to do with an IP address; a script such as the following gets the WAN and LAN IPs, updates my dynamic DNS service and emails me the log. Its run as cron job to go however often it is needed.

MyIPDetailsQuery.sh

Code:
# write a new log each day
myDate=`date +%Y%m%d`

# set up log file
ipFileName="/tmp/ip-details-$myDate.log"

echo "===== IP DETAILS LOG =====" >> $ipFileName
echo "" >> $ipFileName
date >> $ipFileName

# external IP
wget -qO - http://whatismyip.org/ >> $ipFileName
echo "  : external IP addr" >> $ipFileName

# internal IP
/sbin/ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1, " : internal IP addr" }' >> $ipFileName

echo "- - - - - BEGIN no-ip OUTPUT  - - - - -" >> $ipFileName
sudo /usr/local/bin/noip2 -S >> $ipFileName 2>&1
echo "- - - - -  END no-ip OUTPUT  - - - - -" >> $ipFileName

# email the result
/bin/mail -s "IP details query" myadmin@mydomain.com < $ipFileName
If you are not running Linux, then wget is available for Windows (goto sourceforge.net) and I imagine it would not be impossible to produce a BAT file to do the same/similar - although I haven't bothered trying (why bother, when it's so much easier with Linux ).
jcbarr's Avatar
Member with 45 posts.
 
Join Date: Dec 2003
05-Sep-2007, 09:55 AM #9
You can set up a batch file using netsh to output the Network Settings of the NIC on your pc to a text file. Then you can email that to yourself or use the script to FTP that to a site.

When you get where you are going access the text file that you have uploaded and reference the default gateway of in the text file and that will be the IP address of the modem.
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 08:41 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.