He.net Dynamic DNS(動態域名)更新方法

12次閱讀
尚無留言

linux 腳本

#!/bin/bash

IPv4=$(wget -qO- http://v4.ipv6-test.com/api/myip.php)
IPv6=$(wget -qO- http://v6.ipv6-test.com/api/myip.php)
wget --no-check-certificate -qO- "https://dyn.dns.he.net/nic/update?hostname= 要更新的域名 &password= 域名動態密碼 &myip=$IPV4"
wget --no-check-certificate -qO- "https://dyn.dns.he.net/nic/update?hostname= 要更新的域名 &password= 域名動態密碼 &myip=$IPV6"

需使用 curl 進行更新

% curl -4 “http://dyn.example.com:Enable entry for dynamic [email protected]/nic/update?hostname=dyn.example.com”
% curl -6 “http://dyn.example.com:Enable entry for dynamic [email protected]/nic/update?hostname=dyn.example.com”

正文完