Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Raspberry Pi Wi-Fi Ethernet Bridge

Use your Raspberry Pi 3B/3B+/4/5 as an Ethernet bridge on Raspberry Pi OS Bookworm or newer.

About

I have a few older devices that either only have an ethernet connection or have trouble with newer mesh networks. I wanted to get them on my network with the device getting its own IP address from DHCP on the LAN without double NAT. I tried solutions like RaspAP but couldn't it to work as I had hoped while in Bridge mode.

There had to be a more simple solution. After a while, I found Will Haley's post about using a Raspberry Pi as a Wi-Fi Ethernet bridge. After some modifications to the script, I was able to finally get a Raspberry Pi to work as an Ethernet bridge.

How To Use

Review bridge.sh before running this command on your Raspberry Pi:

curl -sSL https://raw.githubusercontent.com/ShiftaDeband/Raspberry-Pi-WiFi-Ethernet-Bridge/refs/heads/main/bridge.sh | sudo bash

Step By Step

  1. You'll need a Raspberry Pi 3B, 3B+, 4, or 5. (FAQ)
  2. Using Raspberry Pi Imager, prepare an SD card with the following:
    1. For OS, use the latest version of Raspberry Pi OS Lite (64-bit). This is somewhat hidden inside Raspberry Pi OS (other).
    2. Configure your hostname, Wi-Fi connection information and country code, username, password, and allow SSH access.
    3. Write to your SD card, and when finished, plug it into your Raspberry Pi.
  3. Power on your Raspberry Pi with the SD card you just created.
  4. After a moment, SSH into your Raspberry Pi. (e.g. ssh username@hostname.local)
  5. When logged in, make sure everything is up-to-date via sudo apt update followed by sudo apt full-upgrade.
  6. When everything is updated, run sudo reboot. After that, wait a few seconds and SSH back into your Raspberry Pi.
  7. Run the script via the following command:
curl -sSL https://raw.githubusercontent.com/ShiftaDeband/Raspberry-Pi-WiFi-Ethernet-Bridge/refs/heads/main/bridge.sh | sudo bash
  1. When the script is done executing, reboot the Raspberry Pi by running sudo reboot.
  2. Plug in an Ethernet cable from the Raspberry Pi to the device you're connecting to the internet.

FAQ

Would a Raspberry Pi Zero W or Zero 2 W work?

A Raspberry Pi Zero W or Zero 2 W may work when using an OTG cable and a USB Ethernet adapter, but is untested. You may also need to modify the network interface name in bridge.sh if it doesn't show up as eth0 in your device list.

Acknowledgements

A huge thank you to Will Haley's post, which was incredibly helpful in getting this version of the script working.

About

Use your Raspberry Pi 3B/3B+/4/5 as an Ethernet bridge on Raspberry Pi OS Bookworm or newer. Based on Will Haley's script.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages