What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

IPv6 GUAs for Isolated Guest Network?

These scripts work on 3004.388.9, minor changes might be needed for 3006.102 & your vlan bridge config.

"/jffs/scripts/firewall-start"
Code:
#!/bin/sh
#Allow all Guest Networks IPv6 WAN access
#Use "ip6tables -vnL FORWARD --line |grep eth " to get line number, change FORWARD # to insert after that line
ip6tables -I FORWARD 12 -i br+ -o $1 -j ACCEPT
3004.388 "/jffs/scripts/dnsmasq.conf.add" use same file for multiple bridges
3006.102 "/jffs/scripts/dnsmasq-1.conf.add" use new file(dnsmasq-index#.conf.add) for multiple bridges?
Code:
# Guest Network br1 IPv6
# DHCPv6 RA interval: 10s, router lifetime: 600s
ra-param=br1,10,600
# DHCPv6 range: whole subnet, constructing from br1's prefix
# DHCPv6 prefix length: 64, mode: Stateless DHCPv6
# DHCPv6 lease time: 600s (10 minutes)
dhcp-range=br1,::,constructor:br1,ra-stateless,64,600
"/jffs/scripts/dhcpc-event"
Code:
#!/bin/sh
setup() {
# Get IPv6 Prefix for BR0
PREFIX=$(nvram get ipv6_prefix)
BR0_NET_ID=$(echo $PREFIX | cut -d':' -f4)

#Set IPv6 Prefix for BR1 - "0x1" is subnet id in hex
BR1_NET_ID=$(printf "%x" $((0x$BR0_NET_ID + 0x1)))
BR1_PREFIX="$(echo $PREFIX | cut -d':' -f1-3):${BR1_NET_ID}::"

ifconfig br1 down
logger "br1:Down"
ip -6 addr add "${BR1_PREFIX}1/64" dev br1
logger "br1: Setting IPv6 address"
ifconfig br1 up
logger "br1:UP"
}

teardown() {
ip -6 route flush dev br1
ip -6 add flush dev br1
}
case "$1" in
bound)
teardown
setup
;;
started|informed|updated|rebound|ra-updated)
setup
;;
stopped|unbound)
teardown
;;
esac
 
Last edited:

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top