Bridging from WiFi to ethernet
rwmaillists at googlemail.com
Sun Jun 20 18:31:52 UTC 2021
Does anyone have a working set of entries in rc.conf to bridge traffic
between ethernet and WiFI adaptors?
The reason I ask is that I have an ethernet printer that I only use
from a Windows laptop (and maybe android in future). The printer used to
plug into the wireless router, but a new router is next to the master socket,
and the printer is now inaccessible from mobile devices.
My wifi is set up like this
ifconfig_wlan0="WPA inet 192.168.1.101 netmask 255.255.255.0 ssid mynetworkname"
and it works (without bridging). From what it says in section 32.6 of the handbook I
thought that something like the following would work:
ifconfig_re0="up" # Ethernet adaptor
ifconfig_wlan0="up WPA ssid mynetworkname" # IP address goes on the bridge
ifconfig_bridge0=" inet 192.168.1.101/24 addm re0 addm wlan0 up"
but after booting the bridge had no IP address and only had re0 as a member.
Thinking it was likely a timing problem I commented-out the bridge line
and configured the bridge manually after boot. I also ran
route add default 192.168.1.1
The bridge now had an IP address and two member interfaces. bridge0 was also
showing as the interface for the default route. It all looked OK, but it doesn't work.
I can't even ping the router.
More information about the freebsd-questions