Skip to content
For bridging/forwarding from an internet interface to another (local) interface on the Raspberry Pi
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A script for bridging two network interfaces on a Raspberry Pi, since simple bridging methods seem to not be compatible with the RPI hardware design.

1. Requirements

# For RPI 2 or below:
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install dnsmasq -y

# If you are using a RPI 3:
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install rpi-update dnsmasq -y
sudo rpi-update

2. Examples

Note: This script does not cover setting up network interfaces. It already assumes the two interfaces you wish to bridge are already configured correctly.

For example interface configurations, look below, or do some Googling :)

Example eth0

allow-hotplug eth0
iface eth0 inet static

Example wlan0

auto wlan0
iface wlan0 inet dhcp
     wpa-driver madwifi #realtek driver (for realtek usb adapter)
     wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf # wpa config
You can’t perform that action at this time.