How do I configure a network interface bridge from WiFi to Ethernet with Debian?
For configuring a bridge from ethernet to wifi, it is as simple as doing in your /etc/network/interfaces
:
auto eth0
allow-hotplug eth0
iface eth0 inet manual
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
auto br0
iface br0 inet static
bridge_ports eth0 wlan0
address 192.168.1.100
netmask 255.255.255.0
Replace the IP address with something more appropriate to your network.
If you prefer the IP attribution done via DHCP, change it to:
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
After changing /etc/network/interfaces
, either restarting Debian or doing
service networking restart
Will activate this configuration.
You will have to make sure for this configuration to have bridge-utils
installed. You can install it with:
sudo apt install bridge-utils
For more information, see:
BRIDGE-UTILS-INTERFACES
The wlan0 interface also has to be condigured to connect to your remote AP so this configuration is not be used verbatim.
Additional note: bridging eth0 and wlan0 together means in poor layman´s terms that br0 will present itself as a single logical interface englobing the interfaces that make part of the bridge. Usually such configuration is made when both extend or belong to the same network.