So I have a pretty complicated network setup. My current router is C7 but, of course, this is EOL; so I’m looking at replicating with R9.
I guess I have 4 zones which correspond to 4 network bridges
WAN (br-wan)
LAN (br-lan)
GUEST (br-guest)
IOT (br-iot)
Some of the basic rules are
LAN goes everywhere
GUEST/IOT can see WAN and specific ports on LAN
Some port forwarding from WAN to LAN
The standarrd complication is “reflection”; if I have a web server exposed to the internet then guest/iot should also be able to see it, so with iptables
we need reflection rules.
My current setup is described at Building a home router · Ramblings of a Unix Geek
Now I know iptables
still works in R9 (“deprecated”) but I’d like to learn how to do it in the modern world; I’ve worked out the nmcli
commands to build the bridges.
#!/bin/sh
WAN=enp1s0
LAN=enp2s0
# Clean up any residual configurations
nmcli connection delete $WAN $LAN.10 $LAN.11 $LAN.12 br-lan br-guest br-iot br-wan
nmcli device delete $LAN.10 $LAN.11 $LAN.12
# Configure internet (WAN)
nmcli device set $WAN autoconnect yes
nmcli connection add type bridge con-name br-wan ifname br-wan bridge.stp no ipv4.method auto ipv4.dns "10.0.0.1 10.0.0.5" ipv4.dns-search "spuddy.org" ipv6.method disabled
nmcli connection add type bridge-slave con-name $WAN ifname $WAN master br-wan # ipv4.method disabled ipv6.method disabled
# Configure the separate VLANs
nmcli device set $LAN autoconnect no
## nmcli connection modify $LAN ipv4.method disabled ipv6.method disabled
nmcli connection add type bridge con-name br-lan ifname br-lan bridge.stp no ip4 10.0.0.1/24 ipv6.method disabled
nmcli connection add type vlan con-name $LAN.10 ifname $LAN.10 vlan.parent $LAN vlan.id 10 slave-type bridge master br-lan
nmcli dev $LAN.10 autoconnect yes
nmcli connection add type bridge con-name br-guest ifname br-guest bridge.stp no ip4 10.100.100.1/24 ipv6.method disabled
nmcli connection add type vlan con-name $LAN.11 ifname $LAN.11 vlan.parent $LAN vlan.id 11 slave-type bridge master br-guest
nmcli dev $LAN.11 autoconnect yes
nmcli connection add type bridge con-name br-iot ifname br-iot bridge.stp no ip4 10.100.200.1/24 ipv6.method disabled
nmcli connection add type vlan con-name $LAN.12 ifname $LAN.12 vlan.parent $LAN vlan.id 12 slave-type bridge master br-iot
nmcli dev $LAN.12 autoconnect yes
But the firewall configuration is a lot harder; all the google-able documents are simple LAN/WAN stuff, without additional networks!
Any pointers?