A 64bit Windows Service that communicates with an external host to retrieve the external ip of the network the service operates on. Useful for services that are running on a network with a dynamic external ip.
- Updates IIS FTP External Firewall Address if the external ip has changed.
- Notifies an admin of the ipvia email so they may update external DNS settings if required.
- [Microsoft .Net 4.7.1+] (https://www.microsoft.com/en-us/download/details.aspx?id=56116)
- [IIS 8.5+] (https://docs.microsoft.com/en-us/iis/install/installing-iis-85/installing-iis-85-on-windows-server-2012-r2)
To install this service:
- Save the exe into a folder from where you'd like it to run from. Eg. "C:\WhatIsMyIp"
- Open a command prompt, as an Administrator, and travel to the Microsoft .Net 4 folder at "C:\Windows\Microsoft.NET\Framework64\v4.0.30319".
- "cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319"
- Ensure you're in the Framework64 folder. This is a 64bit service.
- "cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319"
- Type the following into the command prompt:
- InstallUtil.exe "C:\WhatIsMyIp\WhatIsMyIp.exe"
- The following prompts will appear and the information gathered stored in the Registry at "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WhatIsMyIp"
- Service Host: Enter the web address of the service that will respond to a webrequest with the external ip.
- Expected result is a single string containing the external ip address. Eg. "111.111.111.111"
- Modify parsing if another service provides more information or in another format.
- Email To: Enter the email address of the person who will be notified when the external ip has changed.
- Email From: Enter the email address that will be sending the email.
- Email Host: Enter the SMTP server's address.
- Email Port: Enter the SMTP server's email port.
- Email SSL Enabled: Enter "true" or "false" to enable or disable SSL requirement for emails. Must match SMTP requirements.
- Log File Path: Enter the file path for the log files to be saved. Eg. "C:\WhatIsMyIp\Logs"
- Interval: Enter the amount of time between calls to the external Service Host in milliseconds. Eg. "500000" is 5 minutes.
- Service Host: Enter the web address of the service that will respond to a webrequest with the external ip.
- Confirm settings.
- Press a number from 1-8 to re-enter information for that setting.
- Press 9 to list the available Modules.
- (Optional) If listing modules, you may enable/disable them by pressing their corresponding number.
- Once confimed a prompt will appear asking for credentials.
- These credentials must have rights to read/write from/to the Registry and be able to read wherever the service.exe is stored.
- The account must also be able to modify IIS server settings on the local server.
- Service should now be up and running. To test, force an ip change for your external ip.
- Check logs and email for confirmation of updates.