それマグで!

知識はカップより、マグでゆっくり頂きます。 takuya_1stのブログ

習慣に早くから配慮した者は、 おそらく人生の実りも大きい。

openwrt のddnsで特定のドメインをコマンドから更新するには

OpenWrt のDDNSの管理スクリプトを使って、ドメインをの更新を確認することができる。

openwrt の特定の ドメインを更新するには

設定をテストすることが出来る。

/usr/lib/ddns/dynamic_dns_lucihelper.sh
/usr/lib/ddns/dynamic_dns_updater.sh

たとえば、ddnsのためのglobal_ipチェックをするには

/usr/lib/ddns/dynamic_dns_lucihelper.sh -v 3  -u https://api.ipify.org/ get_local_ip
 232950       : -----> timeout 3 -- get_current_ip IP
 232950       : Detect current IP on 'web'
 232950       : #> /usr/bin/curl -RsS -o /var/run/ddns/lucihelper.27334.dat --stderr /var/run/ddns/lucihelper.27334.err --noproxy '*' 'https://api.ipify.org/'
 232950       : Current IP 'xxx.80.146.218' detected on web at 'https://api.ipify.org/'

たとえば、NAME=cloudflare2 のDDNSエントリを更新するテストする

(NAME は WEBで指定した名前のこと)

/usr/lib/ddns/dynamic_dns_updater.sh -d -v 2  -S cloudflare2 start

ただし、実態は dynamic_dns_functions.sh なので注意。