Cloudflare DDNS 同步脚本

EMAIL 是帐号的邮箱 TOKEN 就是 Access Token ,在 https://dash.cloudflare.com/profile/api-tokens 申请,这里脚本仅需要 DNS:编辑 权限 ZONE 域名 DOMAIN 子域名 ID_ZONE 域的 ID ,通过浏览器 开发者 控制台看即可 ID_DOMAIN 子域名的的 ID,同上 #!/usr/bin/env sh EMAIL= TOKEN= ZONE=iscys.com DOMAIN=sub-domain.$ZONE ID_ZONE= ID_DOMAIN= ID_DOMAIN_v6= # 这里随便换一个你喜欢的 IP=`curl -4 ip.sb` IPv6=`curl -6 ip.sb` #IP=`curl -4 whatismyip.akamai.com` #IPv6=`curl -6 ipv6.whatismyip.akamai.com` curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$ID_ZONE/dns_records/$ID_DOMAIN" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ --data "{\"type\": \"A\", \"name\": \"$DOMAIN\", \"content\": \"$IP\", \"ttl\": 60}" curl -s -X PUT "https://api....

<span title='2021-10-12 18:42:30 +0800 +0800'>2021/10/12 Oct</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;95 words&nbsp;·&nbsp;SCys

Bind9 Dynamic DNS

Dyndns is so nice!1.KeyGen:#dnssec-keygen -a HMAC-MD5 -b 128 -n HOST ddns-keyKddns-key.+157+17069.keyKddns-key.+157+17069.private2.Configure bind name.conf.local. add blow lines:key ddns-key { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret “[key in public file]”;};zone “example.com” { … allow-update { key ddns-key; };};3.Use public key to update zone filensupdate -v << EOFserver ns1.example.comkey ddns-key [key in public file]zone example.com.update delete test.example.com. 300 Aupdate add test.example.com. 300 A 192.168.0.22showsendEOF

<span title='2012-12-15 01:29:00 +0000 UTC'>2012/12/15 Dec</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;58 words&nbsp;·&nbsp;map[name:SCys uri:]