firewall: add firewall bridge IP for UI access

when firewall switched to bridge mode, we want to
have WebUI access to manage the firewall, allow user
setup IP address on the firewall bridge interface through
the UI.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
Vincent Li
2025-04-12 15:42:44 -07:00
parent 57bafb9410
commit cb07f32583
4 changed files with 24 additions and 0 deletions

View File

@@ -456,6 +456,8 @@ iptables_init() {
ip link set $RED_DEV master $FWBRIDGE
ip link set $GREEN_DEV master $FWBRIDGE
ip link set $FWBRIDGE up
ip a add $FWBRIDGEIP/$FWBRIDGEMASK dev $FWBRIDGE
iptables -t filter -A GUIINPUT -i $FWBRIDGE -p tcp -m tcp --dport 444 -j ACCEPT
fi
}