/etc/ddclient/ddclient.conf


daemon=60            –> 최하 60초, 기본은 300초
pid=/var/run/ddclient.pid
use=web, web=checkip.dyndns.org/, web-skip='IP Address'
login=your-username
password=your-password
protocol=dyndns2
server=members.dyndns.org


syslog=yes
wildcard=yes   #wildcard 는 aaa.example.dyndns.org  이런식으로 aaa 부분이 무엇이든 붙여도 되게..
example.dyndns.org
#custom=yes, example.com


#ssl=yes  –> 기본적으론 에러가 생기니 이 옵션은 달지 말것


#mail=root
#mail-failure=root

위의 설정파일을 생성 후


ddclient-3.7.0/ddhclient 를 실행  –> /etc/rc.local에도 삽입



ddclient 3.7.1 파일첨부



## 아래 부분은 네트워크 환경에 따라 수정


공유기 밑에 서버가 위치할 경우 use=web, web=checkip.dyndns.org/, web-skip='IP Address'
공인 ip에 서버가 직접 물려 있을경우 use=ip



– ddclient 3.7.1, ddclient 3.7.2 는 데몬이 제대로 안뜨는 문제점이 발견됨.


–> 해결방법 : mkdir /var/cache/ddclient 만들어 줌


      ddclient 3.7.0 은 /etc/ddclient 디렉토리에 cache 파일이 만들어짐.



– dyndns.org에서 host에 대한 ip를 접속 PC ip로 modify 하고서 client 서버에서 적용 시키려면


ddclient.cache 파일을 지워주어야 적용이 된다. 또는 ddclient.cache내용 중 ip 부분을 수정 해 준다.



디버그 모드로 돌리려면


./ddclient -daemon=0 -debug -verbose -noquiet



dyndns document 원문은 아래와 같다.



Configuration File


Because ddclient supports multiple DDNS services, its configuration files can be fairly daunting. To help alleviate that, we're providing stripped down ddclient.conf files which are restricted to just those services which we support.


Here is a basic template which provides the various options available.

daemon=600 # check every 600 seconds syslog=yes # log update msgs to syslog mail=root # mail all msgs to root mail-failure=root # mail failed update msgs to root pid=/var/run/ddclient.pid # record PID in file. ### Select one of these options to determine your IP address ## via hardware interface (if you don't have a router/firewall) #use=if, if=eth0 ## via our CheckIP server #use=web, web=checkip.dyndns.com/, web-skip='IP Address' ## from the status page for a linksys router/firewall #use=linksys, fw=linksys, fw-login=admin, fw-password=admin ## from a FW status page #fw-login=admin, fw-password=XXXXXX #use=fw, fw=192.168.1.254/status.htm, fw-skip='IP Address' ## Enter your DynDNS username and password here #login=your-login # your DynDNS username #password=your-password # your DynDNS password ## This section requires no changes unless you need to set a default proxy server ## or you need to bypass your proxy server (because it interferes with the updates) protocol=dyndns2 # default protocol server=members.dyndns.org # default server #server=members.dyndns.org:8245 # default server (bypassing proxies) #proxy=fasthttp.sympatico.ca:80 # default proxy ## Default options for Dynamic/Static DNS Hosts #mx= # default MX host (leave undefined by default) #backupmx=NO # MX host is primary MX? (leave undefined by default) wildcard=YES # add wildcard CNAME? ## Dynamic DNS hosts go here #your-dynamic-host.dyndns.org,another-dynamic-host.dyndns.org ## Static DNS hosts go here #static=yes, your-static-host.dyndns.org,another-static-host.dyndns.org ## Custom DNS hosts go here #custom=yes, your-domain.top-level,your-other-domain.top-level 

Here is a minimal ddclient.conf file designed to update a single Dynamic DNS host plus a single Custom DNS host and using our CheckIP service to get the IP address:

# Basic configuration file for ddclient # # /etc/ddclient.conf daemon=600 pid=/var/run/ddclient.pid use=web, web=checkip.dyndns.com/, web-skip='IP Address' login=your-username password=your-password protocol=dyndns2 server=members.dyndns.org wildcard=YES example.dyndns.org custom=yes, example.com 

Here is a third example which shows ddclient configured to get it's IP address from the status page provided by a router. Note that here we've set the deamon sleep period to 60 seconds (the smallest value ddclient accecpt as a sleep value).

# Basic configuration file for ddclient # # /etc/ddclient.conf daemon=60 pid=/var/run/ddclient.pid use=linksys, fw=linksys, fw-login=admin, fw-password=admin login=your-username password=your-password protocol=dyndns2 server=members.dyndns.org custom=yes, example.com 

Secure Updates


Since 3.7.0, ddclient support ssl-updates To use ssl, put "ssl=yes" in your configuration and make sure you have IO::Socket::SSL.

# Basic HTTPS configuration file for ddclient # # /etc/ddclient.conf daemon=600 pid=/var/run/ddclient.pid ssl=yes use=web, web=checkip.dyndns.com/, web-skip='IP Address' login=your-username password=your-password protocol=dyndns2 server=members.dyndns.org wildcard=YES example.dyndns.org custom=yes, example.com 

On debian, you need libio-socket-ssl-perl to have IO::Socket::SSL


Issues To Be Aware Of



  1. The DynDNS update protocol supports values of "NOCHG" for the MX, BACKMX, and WILDCARD options, but ddclient does not support these values. Entering these values in the ddclient.conf file will result in ddclient not setting those options in the update command at all.
  2. The DynDNS protocol specification has the option as BACKMX, but in the ddclient.conf file this is specified using the option "BACKUPMX". ddclient does send the correct parameter in the update command, you just need to be sure to use the ddclient version of the option in the config file.
  3. ddclient can be run either daemon mode, or as a single shot update fired off from crontab or other similar process. When using it in conjunction with CheckIP or monitoring a hardware interface you should always run it in daemon mode.
  4. ddclient currently only supports updates via http. Updates over https are not supported at this time. HTTPS support has been added as of version 3.7.0.

dyndns 를 위한 ddclinet.conf

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다