DDNS 的 update client(inatech, )

最後更新: 2016-08-18

目錄

  • inatech
  • ipcheck
  • Update by Script

前言

現時在網絡上較為出名的 DDNS 有兩個, 分別是

  • dyndns.com
  • no-ip.com

它們主要受重用的原因是免費, 而且已有不少 router 支援它們

ipcheck 是 dyndns 在 Linux 上 update IP 的 Client 來

以下是我使用 ipcheck 的總結 ~

 * 有些 DDNS Client 不支暖 vhosts

 


inatech

主頁:

http://www.inatech.eu/inadyn/readme.html

安裝:

apt-get install inadyn

Version:

inadyn --version

Version: 1.96-ADV

Useful File:

Debian6:

/usr/share/doc/inadyn/examples/inadyn.conf

Usage:

inadyn --dyndns_system [email protected] -u USER-p PASS -a HOST

e.g.

inadyn -u myusername -p ??????? --input_file /tmp/ddns/inadyn.conf

設定檔:

/etc/inadyn.conf

Opts:

Update every minute

--update_period 60000                       # Default is about 1 min. Max is 10 days

--ip_server_name url[:port]                # The client IP is detected by calling 'url'
                                                            Defaults to checkip.dyndns.org:80 .

--dyndns_server_name url[:port]]       # DDNS Server

'-a'                                                    # alias host name (你的 hostname)

--dyndns_system': [NAME]                 # optional DYNDNS service type.

SHOULD be one of the following:
                -For dyndns.org
                -For www.no-ip.com DNS system: [email protected]
                -For generic DNS system: custom@http_svr_basic_auth
                DEFAULT: dyndns.org (most users)

URL Format:

"http://[USERNAME]:[PASSWORD]@DDNS-URL/nic/update?hostname=[DOMAIN]&myip=[IP]"

/tmp/ddns/inadyn.conf:

--background --dyndns_system custom@http_svr_basic_auth -a <YOUR_DDNS_HOSTNAME> \
--update_period_sec 600 --forced_update_period 86400 --log_file /tmp/ddns/ddns.log \
--cache_dir /tmp/ddns --exec ddns_success --dyndns_server_name <<YOUR_SERVER>  \
--dyndns_server_url /nic/update?hostname=

cmd:

inadyn -u your_name -p your_pw --dyndns_server_name xxx.xxx.xxx -a xxx.xxx.xxx --dyndns_system custom@http_svr_basic_auth --dyndns_server_url /nic/update?hostname=

output:

INADYN: Started 'INADYN version 1.96.2' - dynamic DNS updater.
I:INADYN: IP address for alias 'tim.dnslink.hk' needs update to '123.202.144.65'
I:INADYN: Alias 'tim.dnslink.hk' to IP '123.202.144.65' updated successful.

 


ipcheck

首先就是安裝

apt-get install ipcheck

^^ 完成 ~

update IP 方式:

ipcheck.py --makedat -v -c -r checkip.dyndns.org:8245  username password hostnames

 


Update by Script

 

Scripts:

#!/bin/bash

_SERVER='www.dnslink.hk'
_HOST='????.dnslink.hk'
_USER='????'
_PW='????'

_LINK=http://$_USER:$_PW@$_SERVER/nic/update?hostname=$_HOST

wget $_LINK -q -O /dev/null

Success response:

HTTP request sent, awaiting response... 200 OK

 


inadyn-mt

 

Download: https://sourceforge.net/projects/inadyn-mt/

Binary

inadyn-mt.exe --input_file inadyn-mt.conf

inadyn-mt.conf

--dyndns_system custom@http_svr_basic_auth
--dyndns_server_url /nic/update?hostname=
--dyndns_server_name www.dnslink.hk
--ip_server_name www.dnslink.hk /ip.php
--cache_dir .
--log_file .\\inadyn_log.log
--update_period_sec 180
--forced_update_period 3600
--alias xxx.dnslink.hk
--username xxx
--password xxx

'--ip_server_name': <srv_name[:port] url>

'--update_period_sec': <#>            How often the IP is checked.(Default: 600)

'--forced_update_period': <#>       The IP is updated even if it is not changed. (Default, 30 days.)

Service

    '-i': [quoted service description] [-n <service name>] - install service

    '-s': [-n <service name>] - start service

    '-e': [-n <service name>] - exit service

    '-r': [-n <service name>] - restart service

    '-x': [-n <service name>] - uninstall service

regetry setting

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\inadyn-mt\Parameters]
"AppParameters"="
--background
--dyndns_system custom@http_svr_basic_auth
--dyndns_server_url /nic/update?hostname= --dyndns_server_name www.dnslink.hk
--ip_server_name www.dnslink.hk /ip.php --cache_dir .
--log_file .\\inadyn_srv.log --verbose 1
--update_period_sec 180
--forced_update_period 30 --alias ddns.dnslink.hk
--username ddns
--password 27717387"
"ServiceLog"=""

Uninstall

inadyn-mt.exe -e

inadyn-mt.exe -u

 

Creative Commons license icon Creative Commons license icon