|
NAMEdynip —
Dynamic IP Address Updater.
DESCRIPTIONdynip is a daemon that monitors your host system ISP assigned dynamic IP address. If it changes, dynip automatically updates the dynamic DNS IP address at your dynamic DNS hosting provider then posts an informational message to the host system log followed by sending an informational email to user root.The dynip daemon and the daily script are very simple Bourne Shell type scripts containing self documenting embedded comments. They use the "fetch" command to issue the standard browser style URL format used by most dynamic DNS hosting providers for the purpose of actual updating the registered IP address with the new IP address. There are some small variations in the URL format depending on the dynamic DNS hosting provider being used. On purpose the new IP address is not included in the standard browser style URL format because the dynamic DNS hosting providers update process will use the IP address of the sending update request as the value to update their records to. Mandatory requirements.The host that is running dynip "MUST" be cabled directly to the modem and be using the public routable dynamic IP address assigned by the ISP.Be aware some modems with built in routers do not pass the public routable dynamic IP address assigned by the ISP. The router assigns it's own private IP address and considers everything downstream from it as it's private LAN. dynip will not be usable in this situation. How does it work.The /usr/local/etc/rc.d/dynip script is automatically launched at system boot time and system shutdown time to start and stop the dynip daemon. The "service dynip start" and "service dynip stop" console commands can be manually issued for user control between boots.The /usr/local/bin/dynip script is the running daemon. This script runs continually and on a user defined timed cycle will check the dynamic ip address of the interface facing the public internet to determine if it has changed. If it has changed the browser URL format is used to update the IP address at the dynamic DNS hosting provider that is hosting your Fully qualified domain name to the newly changed ip address. Most DNS hosting sites that provide dynamic DNS services use a variation of the default browser URL format used here. A simple user substitution to the "fetch" command for the browser URL format used by your dynamic DNS hosting provider will allow this script to work for you. The /usr/local/etc/periodic/daily/dynip script will force an update of the hosts IP address at the dynamic DNS hosting provider as part of the normal operating system daily reporting system. How to setup.1. Edit /etc/rc.conf and add this enable_dynip="YES"
How to do initial testing with your dynamic DNS hosting provider.Even though some browser URL formats are provided in the next section, over time things change and the browser URL formats may change. Once you sign up with your dynamic DNS hosting provider, you should inquire about their browser URL format used for remote IP address update. Sometimes this information is documented under Unix software client programs or remote client programs. Compare their information to the browser URL formats in the next section and choose a format that matches best. Many dynamic DNS hosting provider are moving to a authentication token for increased security so choose that if available.Copy the /usr/local/etc/periodic/daily/dynip script to /usr/local/bin/dynip_daily then copy and paste the best matching browser URL format from the next section into the development copy /usr/local/bin/dynip_daily and edit and execute that copy until the update works. When it's working, copy it back to /usr/local/etc/periodic/daily/dynip and then copy the same working changes to the /usr/local/bin/dynic script. To test the /usr/local/bin/dynic script, first enable the 10 second cycle timer option in the script. Deleteing the /usr/local/etc/dynic file which holds the saved IP address before issuing the "service dynip start" console command will force an update to your dynamic DNS hosting provider to occur. You have to issue "service dynip stop" before making changes to the /usr/local/bin/dynic script. When you have both the /usr/local/bin/dynic script and the /usr/local/etc/periodic/daily/dynip scripts working correctly, make backups and save the backup some where you can access if your system dies. Also NEVER reinstall the dynip port/package again as it will install over your working scripts losing all your customization work. Some browser URL's used by dynamic DNS hosting sites.1. [easydns.com] ###################################################################### # # For easydns.com, a pay for Dynamic DSN service # # The authentication token value is generated after you sign up, and # purchase a DNS plan. A login authentication token is mandatory. See # https://kb.easydns.com/knowledge/dynamic-dns/ for details. # ip="&myip=0.0.0.0" # set to offline state ip1="&myip=1.1.1.1" # set to detect pc on LAN loginid="xxxxx" token="yyyyyyyyyyyyyyyy" hostname="Your-domain-name" login="https:${loginid):${token)" website="@api.cp.easydns.com/dyn/generic.php?"
AUTHORJoe Barbish ⟨dynip@a1poweruser.com⟩
Visit the GSP FreeBSD Man Page Interface. |