相关文件下载
爱快主路由下 IPV6 防火墙的最优解(可能)
调试过程:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
newpd=`ubus call network.interface.wan6 status |jq '.["ipv6-prefix"][0]' | jq -r '"\(.address)\/\(.mask)"'`
lan_v6=`ubus call network.interface.lan status |jq '.["ipv6-address"][0]' | jq -r '"\(.address)\/\(.mask)"'`
newpd=`ifstatus wan6|jq '.["ipv6-prefix"][0]' | jq -r '"\(.address)\/\(.mask)"'` lan_v6=`ifstatus lan|jq '.["ipv6-address"][0]' | jq -r '"\(.address)\/\(.mask)"'`
uci set network.lan.ip6addr='24xx:xxxx:xxx:xxxx::/64' uci commit network service network restart
if [ "$newpd" != "$lan_v6" ];then uci set network.lan.ip6addr=$newpd;uci commit network;service network restart;fi
|
1 2 3
|
* * * * * newpd=`ifstatus wan6|jq '.["ipv6-prefix"][0]' | jq -r '"\(.address)\/\(.mask)"'`;lan_v6=`ifstatus lan|jq '.["ipv6-address"][0]' | jq -r '"\(.address)\/\(.mask)"'`;if [ "$newpd" != "$lan_v6" ];then uci set network.lan.ip6addr=$newpd;uci commit network;service network restart;fi
|
相关参考:
https://openwrt.org/zh/docs/guide-user/base-system/uci
阅读全文 »
本文仅作为技术讨论及分享,严禁用于任何非法用途。
2023.5.4 更新:
2023-03-21,爱快官方iKuai8_3.7.0以上版本已更新ipv6 ACL支持,使用官方ACL成为最优解。