Tech Line

WAN IP… What is it?

Watch WAN IP is a handy tool for monitoring the external IP address of SOHO routers.

Chris: I have a question about monitoring the WAN IP of my home office router. I travel quite a bit for work and often access my home office LAN using RDP to view files and remotely run programs and demonstrations. I have a Linksys WRT54G wireless access point and router connected to my home network and have port forwarding configured to map different external ports to specific systems on my internal LAN. Since it’s a home office network, honestly I’m too cheap to pay for a static IP. Because of this, I’m sometimes screwed when my WAN IP changes and I’m on the road. Are there any monitoring tools that you can recommend that can alert me if my WAN IP changes?
— Steve

Tech Help—Just An
E-Mail Away

Got a Windows, Exchange or virtualization question or need troubleshooting help? Or maybe you want a better explanation than provided in the manuals? Describe your dilemma in an e-mail to the MCPmag.com editors at mailto:[email protected]; the best questions get answered in this column and garner the questioner with a nifty MCPmag.com baseball-style cap.

When you send your questions, please include your full first and last name, location, certifications (if any) with your message. (If you prefer to remain anonymous, specify this in your message, but submit the requested information for verification purposes.)

Steve, I first must admit that this is the first time I’ve entertained a question involving anything Linksys in this column. However, due to the popularity of this particular device (coupled with some lingering Christmas spirit), I feel compelled to help you out.

For SOHO routers that have HTTP enabled monitoring and management, I have always liked the tool Watch WAN IP (WWIP), which is developed by Ed McInerney. WWIP is free for non-commercial use ($25 commercial) and works with most varieties of SOHO routers. What I like most about WWIP in comparison to similar tools that I've looked at is that it has the ability to notify you via e-mail if your WAN IP changes. So you don’t have to be sitting at your home PC in order to determine your new WAN IP in the event that it changes. WWIP also has the ability to perform an FTP upload of the new address when a change occurs. This can be useful for maintaining a link to your home network from a Web site.

Using WWIP is relatively simple. After downloading the tool, just unzip the downloaded file and then run WWIP.exe from the folder containing the extracted WWIP files. The Readme.htm file that’s included with WWIP provides detailed configuration instructions that should help you complete the setup.

Since it sounds like Steve is rarely home to personally monitor his WAN IP, I saw a major flaw in using WWIP for monitoring the external IP address of his home network – this tool is designed to run as an application. If Steve was to log off from his home computer, WWIP would close and, thus, stop monitoring his external IP address. Instead, a better solution is to configure WWIP to start as soon as his system boots. This can be done by configuring the application to run as a service.

Running applications as services can be accomplished using the Windows Server 2003 Resource Kit tools instsrv.exe and srvany.exe. With these two tools, you can create a system service that starts any application you wish. This can allow you to run WWIP as a service. The Windows 2003 RK tools will also install on Windows XP, so you shouldn’t have any trouble using this procedure on your home system. For those of you with Windows 2000 systems at home, you would need to either copy these tools from the Windows 2000 Resource Kit or as an alternative install the Windows Server 2003 Resource Kit on an alternate Windows 2003 or XP system and then copy instsrv.exe and srvany.exe to the Windows 2000 system. Once you have the Resource Kit or copied these files to your system, you should also ensure that both instsrv.exe and srvany.exe are in a folder that is included in the system path, such as C:\Windows.

For the WWIP application to work properly as a service, make sure that the Auto Poll option is selected under the Router Configuration tab in the WWIP configuration dialog box. If auto poll is not enabled, WWIP will not poll for the WAN IP address while it’s running in the background as a service. With the Auto Poll option enabled, you can now create the WWIP service. To do this, run instsrv.exe with the following syntax:

instsrv <service name> <path to srvany.exe file>

For example, if you wanted to name the new service WWIP and the srvany.exe file was located in the C:\Windows folder, you would run instsrv WWIP c:\windows\srvany.exe. Now that the service is created, you now need to add a parameter to the service to tell it to run wwip.exe once the service starts. To do this, follow these steps:

  1. Run Regedit and navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<WWIP service name> key. In my example, you would navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WWIP key.
  2. Once you locate the key, right-click on it, select New, and then click Key.
  3. Name the new key parameters and hit Enter.
  4. Next, right-click the Parameters key, select New, and then click String Value. Name the new value Application.
  5. Now double-click the Application value, enter the path (contained in quotes) to the wwip.exe file (such as “C:\WWIP\wwip.exe”), and click OK.

Your service is now ready to run. By default, it will be configured to start automatically once the system boots. To see it run immediately, start the WWIP service from the Services MMC. With WWIP configured to run in the background as a service and with its email or FTP options configured, you will now be notified whenever your router’s WAN IP address changes.

Instsrv and srvany have almost limitless possibilities. Whenever I need an application to run at system startup, configuring it to run as a service provides an easy way to do so. In fact, these tools have become so popular that many celebrities are jumping on the instsrv and srvany bandwagons. Rumor has it that when asked if he uses srvany and instsrv, Snoop Dogg himself replied “Fo shizzle!”

Happy New Year, everyone!

About the Author

Chris Wolf is a Microsoft MVP for Windows --Virtual Machine and is a MCSE, MCT, and CCNA. He's a Senior Analyst for Burton Group who specializes in the areas of virtualization solutions, high availability, storage and enterprise management. Chris is the author of Virtualization: From the Desktop to the Enterprise (Apress), Troubleshooting Microsoft Technologies (Addison Wesley), and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).learningstore-20/">Troubleshooting Microsoft Technologies (Addison Wesley) and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).

comments powered by Disqus
Most   Popular