本帖最后由 chuanlbs 于 2022-5-3 08:17 编辑
使用内置的DUCKDNS Add-ons可以轻松的实现ipv4ddns,但是ipv6官方是不支持的
虽然DUCKDNS支持使用URL配置IPV6地址,但是直接配置为URL就会出现以下问题
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cmd] /run.sh exited 7
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
原因可能是duckdns所在的容器获取不到公网IPv6?(这个我概念不太清楚,菜鸟一个~)在GitHub上找到一个取巧的方法,用脚本定期刷新本机的ipv6地址到一个url里,然后在把这个url作为addon的配置就行啦
https://github.com/home-assistant/addons/issues/1715#issuecomment-859165416
在terminal里,把下面代码段的代码存在/etc/periodic/15min/update-ipv6 文件里,设置下权限chmod +x update-ipv6
#!/usr/bin/env bashio
bashio::network.ipv6_address eth0 | grep ^24 | sed 'sx/64xx' > /config/www/ipv6.txt
sed -i -e "2d" /config/www/ipv6.txt
重启HA,然后像下图这样配置DUCKDNS就行啦,配置的位置在HACS--加载项--duckdns--configuration里再重启add-ons就好啦
|