January 7, 2016

树莓派使用ddclient和DDNS

域名解析 首先得有个域名,在域名管理中将域名DNS设为he.net的DNS地址,如下: ns1.he.net ns2.he.net ns3.he.net ns4.he.net ns5.he.net 然后在http://dns.he.net注册账号,添加域名(Add a new domain) 接下来添加A记录(New A),勾选允许动态域名解析(Enable entry for dynamic dns) 点击域名后DDNS列中的刷新按钮,新建一个DDNS密匙(Generate a DDNS key.) 安装设置ddclient 在树莓派上安装ddclient sudo apt-get install ddclient 编辑ddclient配置文件,路径为/etc/ddclient.conf protocol=dyndns2 use=web,web=myip.dnsomatic.com server=dyn.dns.he.net login=raspi.in password='ddnskey' www.raspi.in,raspi.in 其中password为设置DDNS时的key 重启ddclient服务 service ddclient restart 验证IP查询结果 sudo ddclient -query use=if, if=eth0 address is 192.168.1.111 use=if, if=lo address is 127.0.0.1 use=web, web=dnspark address is 36.40.143.235 use=web, web=dyndns address is NOT FOUND use=web, web=loopia address is 36. Read more

© unixetc.com 2012 - 2019
README