I am new to Networking.
I am working on a project where I need to implement a Captive Portal inside an Alpine Linux container, but there are some tricky parts to it.
The system I am working on uses two bridged LXC containers both running Alpine Linux.
The network configuration is as follows:
Container A: WLAN0/WLAN1 -> br0 -> veth(Container A) -> veth(Container B) -> br0 -> veth(Container B) -> veth(Host) -> cbr0 -> LAN2 -> LAN1/WAN
Right now I am just trying to manually adjust the routing rules to achieve the redirection and then I can implement something like Nodogsplash, but I can't even get the redirection to work. The challenge seems to be that because the containers are bridged, the traffic only happens on layer 2, so I can't apply any layer 3 rerouting rules with iptables or nftables.
I can't use broute from ebtables for some reason because Alpine doesn't support that functionality.
From my perspective, I need to find a way to get the traffic to be accessible by layer 3 somehow, but maybe there is another way.
So how can I go about doing this? Am I missing something?
The system requires this two container setup, so I can't adjust that at all. I may be able to add an additional container or run the Captive Portal on the host, but that would be a last resort move.
Any advice is appreciated :)