Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
dynip(8)		FreeBSD	System Manager's Manual		      dynip(8)

NAME
     dynip -- Dynamic IP Address Updater.

DESCRIPTION
     dynip 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"

       2. The elapse time between checks of the	current	IP address defaults to
	  every	15 minutes. You	can select a different elapse time by editing
	  the  /usr/local/bin/dynip script and following the comments there.

       3. You must edit	the /usr/local/bin/dynip script	and the
	  /usr/local/etc/periodic/daily/dynip script and make the same
	  changes to the URL variables which are unique	to the browser URL
	  format used by your dynamic DNS hosting provider.

       4. A system boot	is not required	to activate the	dynip daemon. Issue
	  "service dynip start"	command	from the console command line.

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?"

       # For testing reset to not point	at this	host
       #url="${login)$website${hostname)${ip}"

       # For normal update

       url="${login)$website${hostname)"

       #
       ######################################################################

       2.   [freedns.afraid.org]
       ######################################################################
       #
       # For freedns.afraid.org	NO cost	Free Dynamic DSN service
       #
       # The authentication_token value	is generated after you login and
       # select	a existing domain to add your sub-domain prefix	to. Review
       # Step 4	of this	guide https://freedns.afraid.org/guide/dd-wrt-v2 for
       # details.
       #
       ip="?ip=127.0.0.1"
       authentication_token="yyyyyyyyyyyyyy"
       website="http://sync.afraid.org/u/"

       # For testing reset to not point	at this	host
       #url="$website$authentication_token$ip"

       # For normal update
       url="$website$authentication_token"

       #
       ######################################################################

       3.   [changeip.com]
       ######################################################################
       #
       # For changeip.com NO cost Free Dynamic DSN service
       # The values used to populate loginid & passwd are the values you used
       # to sign up with.
       #
       loginid="&u=xxxxxxx"
       passwd="&p=yyyyyyyy"
       hostname="&hostname=fbsd.dynamic-dns.net"
       ip="&set=127.0.0.1"
       website="https://nic.changeip.com/nic/update?cmd=update"

       # For testing reset to not point	at this	host
       #url="${website}${loginid}${passwd}${hostname}${ip}"

       # For normal update
       url="${website}${loginid}${passwd}${hostname}"

       #
       ######################################################################

       4.   [no-ip.com]
       ######################################################################
       #
       # For no-ip.com NO cost Free Dynamic DSN	service
       #
       # Note: When you	first sign up your email address is your login id.
       # During	a later	login you will be asked	to fill	out personal info and
       # there you are asked to	enter a	login NAME. This "login	NAME" is the
       # value you use to populate the login_name variable below. And the
       # sign up password value	is used	to populate login_password.
       #
       # Using the login_name and login_password will pass that
       # information enclosed in the https protocol which is secure.
       #
       ip="&myip=127.0.0.1"
       login_name="xxxxxxxx"
       login_password="yyyyyyyy"
       hostname="zzzzzzzzzz"

       token="https://${login_name}:${login_password}"
       website="@dynupdate.no-ip.com/nic/update?hostname="

       # For testing, reset ip to not point at this host
       #url="${token}${website}${hostname}${ip}"

       # For normal update
       url="${token}${website}${hostname}"

       #
       ######################################################################

       5.   [namecheap.com]
       ######################################################################
       #
       # For namecheap.com pay for hosting services.
       #
       # A login authentication	token is the mandatory password.
       # You generate it from the c-panel after	sign up	& login.
       #
       password="&password=yyyyyyyyyyyyy"
       website="https://dynamicdns.park-your-domain.com/update?"
       dyn_host="host=xxxxxx&domain=zzzzzzz"
       url="$website$dyn_host$password"

AUTHOR
     Joe Barbish <dynip@a1poweruser.com>

FreeBSD	13.0		       November	10, 2017		  FreeBSD 13.0

NAME | DESCRIPTION | Mandatory requirements. | How does it work. | How to setup. | How to do initial testing with your dynamic DNS hosting provider. | Some browser URL's used by dynamic DNS hosting sites. | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=dynip&sektion=8&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help