This guide shows how to set up a Raspberry Pi as a WiFi access point that bridges to your ethernet LAN, allowing WiFi clients to access the entire local network on the same subnet.
- Raspberry Pi with Raspberry Pi OS Lite (fresh install)
- External USB WiFi adapter (e.g., Ralink RT5572)
- Ethernet connection to your LAN
- Separate DHCP server on your network (e.g., MikroTik router at 192.168.1.2)
- SSH access to the Pi
The setup creates a bridge (br0) that combines:
eth0(ethernet connection to LAN)wlan1(external USB WiFi adapter as access point)
WiFi clients connect through the access point and appear on the same subnet as your wired LAN devices. A separate DHCP server (MikroTik) handles IP assignment for all devices.
SSH into your fresh Raspberry Pi and update the system:
sudo apt update
sudo apt upgrade -ysudo apt install hostapd bridge-utils -yhostapd: Creates the WiFi access pointbridge-utils: Manages the network bridge
Edit the dhcpcd configuration to prevent it from managing individual interfaces:
sudo nano /etc/dhcpcd.confAdd these lines at the very top of the file:
denyinterfaces wlan0 wlan1 eth0
interface br0
This tells dhcpcd to:
- Ignore all WiFi interfaces and ethernet
- Only manage the bridge interface (
br0)
Save and exit (Ctrl+O, Enter, Ctrl+X).
systemd-networkd will handle bridge creation and configuration cleanly.
sudo nano /etc/systemd/network/br0.netdevAdd:
[NetDev]
Name=br0
Kind=bridge
Save and exit.
sudo nano /etc/systemd/network/br0-member-eth0.networkAdd:
[Match]
Name=eth0
[Network]
Bridge=br0
Save and exit.
sudo nano /etc/systemd/network/br0-member-wlan1.networkAdd:
[Match]
Name=wlan1
[Network]
Bridge=br0
Save and exit.
Note: This assumes your external USB WiFi adapter appears as wlan1. If it appears as a different interface (e.g., wlan0 if you disabled onboard WiFi), adjust accordingly.
sudo nano /etc/systemd/network/br0.networkAdd:
[Match]
Name=br0
[Network]
DHCP=yes
This configures the bridge to get its IP via DHCP from your network's DHCP server.
Save and exit.
sudo systemctl enable systemd-networkd
sudo systemctl start systemd-networkdCreate the hostapd configuration file:
sudo nano /etc/hostapd/hostapd.confAdd the following configuration (customize as needed):
interface=wlan1
bridge=br0
driver=nl80211
ssid=HiddenSpring
hw_mode=g
channel=10
auth_algs=1
wpa=2
wpa_passphrase=nekos2000
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
country_code=GR
Configuration explained:
interface=wlan1: WiFi adapter to use (adjust if different)bridge=br0: Bridge WiFi clients directly to br0ssid=HiddenSpring: WiFi network name (change as desired)wpa_passphrase=nekos2000: WiFi password (change to your password)channel=10: WiFi channel (adjust if needed)country_code=GR: Country code (change to your country, e.g., US, GB, DE)
Save and exit.
Unmask the hostapd service (it's masked by default):
sudo systemctl unmask hostapdEnable it to start on boot:
sudo systemctl enable hostapdOn your MikroTik (or other DHCP server):
- Ensure DHCP is enabled and configured for your subnet (e.g., 192.168.1.0/24)
- Set an appropriate IP pool (e.g., 192.168.1.17-192.168.1.200)
- Configure gateway (e.g., 192.168.1.1)
- Configure DNS servers (e.g., 8.8.8.8, 8.8.4.4)
- Disable any MAC-IP binding or client isolation features that might block bridged clients
If you want to completely disable the Pi's onboard WiFi to ensure only the external adapter is used:
sudo nano /boot/firmware/config.txtAdd at the bottom:
dtoverlay=disable-wifi
dtoverlay=disable-bt
Save and exit.
Note: Only do this after confirming your external USB adapter is working as wlan1.
Reboot the Pi to apply all changes:
sudo rebootAfter the Pi reboots, SSH back in and verify the setup:
brctl showExpected output:
bridge name bridge id STP enabled interfaces
br0 8000.xxxxxxxxxxxx no eth0
wlan1
ip addr show br0The bridge should have a single IP address in your subnet (e.g., 192.168.1.173).
sudo systemctl status hostapdShould show "active (running)".
From a laptop or phone:
- Search for WiFi networks - you should see your SSID (e.g., "HiddenSpring")
- Connect using your configured password
- Verify you receive an IP in your LAN subnet (e.g., 192.168.1.x)
- Test internet access
- Test access to other LAN devices (ping, SSH, etc.)
Check hostapd status:
sudo systemctl status hostapd
sudo journalctl -u hostapd -n 50Ensure wlan1 exists:
iw dev
ip link show wlan1Check if bridge is up and has both interfaces:
brctl show
ip addr show br0Verify DHCP server is responding:
sudo tcpdump -i br0 port 67 or port 68Then reconnect WiFi - you should see DHCP DISCOVER and OFFER packets.
Check systemd-networkd:
sudo systemctl status systemd-networkd
sudo journalctl -u systemd-networkd -n 50Check if it's seen by USB:
lsusbCheck kernel messages:
dmesg | grep -i usb | tail -20
dmesg | grep -i wlanSome adapters may need additional drivers.
Internet
↓
Router (192.168.1.1)
↓
├─ eth0 ──┐
br0 (192.168.1.x) ← DHCP from MikroTik
└─ wlan1 ──┘
↓
hostapd (Access Point: "HiddenSpring")
↓
WiFi Clients (192.168.1.x) ← DHCP from MikroTik
All devices (wired ethernet, Pi bridge, WiFi clients) exist on the same subnet and can communicate directly.
- This setup requires a separate DHCP server on your network (router or dedicated server)
- All WiFi clients appear on the same subnet as your wired network
- The Pi itself also gets an IP from the DHCP server
- No NAT is involved - this is a true bridge configuration
- systemd-networkd handles bridge creation cleanly on every boot
- No custom scripts or services needed beyond standard configuration files
This guide was created after extensive troubleshooting to replace RaspAP with a clean, minimal configuration that actually works.