先通过web或修改配置添加wifi guest访客网络,network配置,通过mtk管理界面添加的无线接口要添加到网桥:
config globals 'globals'
option ula_prefix 'xxxx:xxxx:xxxx::/48'
config interface 'guest'
option proto 'static'
option ipaddr '10.0.100.1'
option netmask '255.255.255.0'
option device 'br-guest'
option ip6assign '64'
#分配的前缀,即xxxx:xxxx:xxxx:10::/64
option ip6hint 10
#只分配ula_prefix定义的私网,如果pppoe能分配60或以上可以不配置此选项分配私网和wan_6公网
list ip6class local
config device
option type 'bridge'
option name 'br-guest'
list ports 'ra1'
list ports 'rax1'
通过openwrt原生无线管理添加的接口要添加到指定网络无需额外添加到网桥:
config wifi-iface 'wifinet3'
option device 'MT7986_1_1'
option mode 'ap'
option ssid '2.4G-guest'
option encryption 'psk-mixed'
option key 'www.haiyun.me'
option network 'guest'
dhcp配置:
config dhcp 'guest'
option interface 'guest'
option start '150'
option limit '100'
option leasetime '12h'
option dhcpv4 'server'
list ra_flags 'none'
option dns_service '0'
option ra_default '2' #强制通告ipv6路由给客户端
option ra 'server'
option ra_maxinterval '120'
option ra_ra_mininterval '60'
option ra_lifetime '1200'
option ra_useleasetime '1'
option preferred_lifetime '10m'
iptables配置:
ip6tables -A INPUT -i br-guest -p icmpv6 -j ACCEPT
ip6tables -A FORWARD -i br-guest -o pppoe-wan -j ACCEPT
ip6tables -t nat -A POSTROUTING -s xxxx:xxxx:xxxx:10::/64 -o pppoe-wan -j MASQUERADE
当pppoe成功获取ipv6时添加ipv6默认路由:
echo 'ip -6 rou add default via $LLREMOTE dev $IFNAME' >> /lib/netifd/ppp6-up
如果是dhcp获取添加hotplug设置ipv6默认路由:
#!/bin/bash
if [ $ACTION = "ifup" -a "$INTERFACE" = "wan6" ]; then
ip -6 rou add default via fe80::1 dev eth1
fi
标签:none
您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
不好意思,没有。