title
write contents here
How to
url to check ip
https://ddns.oray.com/checkip https://4.ipw.cn http://v4.ip.zxinc.org/getip https://myip4.ipip.net https://ip.3322.net https://www.taobao.com/help/getip.php https://v4.myip.la https://ipv4.ddnspod.com
configs
service_name cloudflare.com-v4 domain [Your domain, here: example.com] username Bearer password [Your API token]
If the hostname is “sample.example.com”, the “domain” field would be “[email protected]” If the hostname is “dev1.sample.example.com”, the “domain” field would be “[email protected]” If using Cloudflare's “Subdomain Support”, your zone may already be “foo.example.com”, so if the DDNS hostname is “bar.foo.example.com” the domain field would be “[email protected]”
startup enable
/etc/init.d/ddns enable
当路由器开启了全局代理,有无法获得准确的ip地址,解决方案如下: 通过ssh到上一级路由器,获取上级路由器的wan ip
查看上级路由器的wan ip
WAN_IP=$(ssh $UPPER_ROUTER_USER@$UPPER_ROUTER_IP "ip addr | grep ppp0 | sed -n 's/.*inet \([0-9\.]*\).*/\1/p'")
References
https://openwrt.org/docs/guide-user/services/ddns/client?s%5B%5D=cloudflare#cloudflarecom