Skip to content

Instantly share code, notes, and snippets.

@RafhaanShah
Last active April 17, 2022 14:51
Show Gist options
  • Save RafhaanShah/748f580747e4e436cce5d820ef20e5ab to your computer and use it in GitHub Desktop.
Save RafhaanShah/748f580747e4e436cce5d820ef20e5ab to your computer and use it in GitHub Desktop.
Raspberry Pi Bridged Interfaces
# https://www.raspberrypi.com/documentation/computers/configuration.html#intro-to-bridged-wap
# https://www.maketecheasier.com/turn-raspberry-pi-into-wi-fi-bridge/
------------------------------
sudo nano /etc/systemd/network/bridge-br0.netdev
[NetDev]
Name=br0
Kind=bridge
------------------------------
sudo nano /etc/systemd/network/br0-member-eth0.network
[Match]
Name=eth0
[Network]
Bridge=br0
------------------------------
sudo nano /etc/systemd/network/br0-member-eth1.network
[Match]
Name=eth1
[Network]
Bridge=br0
------------------------------
sudo nano /etc/dhcpcd.conf
denyinterfaces veth*
denyinterfaces eth0 eth1
interface br0
static ip_address=192.168.1.20
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
------------------------------
sudo nano /etc/sysctl.conf
net.ipv4.ip_forward=1
------------------------------
sudo systemctl enable systemd-networkd
systemctl disable systemd-networkd-wait-online.service
sudo reboot now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment