I've pieced together a jail for containing my wifi network. It has two interfaces:
Is this possible? I have already tried putting
jail0- The jail half of an epair(4) interface (epairXb)wlan0- physical wlan0 from host
wlan0 will host my local wireless network, but I want to create something like an Ethernet bridge between the wlan0 and jail0 interfaces. I did not assign jail0 an IP address, because I want this to happen at OSI layer 2. My thinking is, if I can do that, then traffic from wireless client stations will transit through jail0 to pop out on the host-side's epairXa interface with the wireless LAN IP addresses intact (so that I can avoid having to do double NAT or fiddling around with some weird UDP-encapsulated mess).Is this possible? I have already tried putting
wlan0 and jail0 into a bridge0 inside the jail, and my wireless client can ping the wlan0 interface fine. But IPv4 traffic is not moving from wlan0 through jail0 as far as i can tell. Oddly enough, IPv6 traffic is, as if I put tcpdump on the host epairXa interface, I can see attempts by the wireless client (an android phone) trying to get to Google, and the IPv6 packets are carrying the client's fe80 link-local IPv6 address as source and one of Google's IPv6 addresses as destination (but I haven't joined the IPv6 internet yet, so these packets won't go anywhere). So I kinda think the bridge idea is working, but I need it to forward IPv4 traffic only. However, I am somewhat stumped at this point, and really don't know the right Google keywords to look for to get any further.