Using a Raspberry Pi 3 as a Wifi access point and bridge

In this article I’ll present how I used a Raspberry Pi 3 to create a Wifi access point. The specificity of my setup, is that the Raspberry won’t be a router but a bridge. DHCP is thus delegated to the main ADSL router and all devices connected to the AP will appear on the same network than other devices.

The instructions below are based on a fresh Raspbian lite install so that it can be reproduced easily.

Install the required packages :

sudo apt-get install -y bridge-utils hostapd

To create a bridge, we need to enable ip_forward in the kernel, for that, edit /etc/sysctl.conf and remove comment (#) from the following line :


Then configure your network to create a bridge with eth0, in /etc/network/interfaces :

auto lo
iface lo inet loopback

# Disable eth0 / wlan0 config, handled by bridge
auto eth0
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual

# Create a bridge with static IP
auto br0
iface br0 inet static
        bridge_ports eth0
# Or use dhcp client on bridge
#iface br0 inet dhcp

You may have noticed that wlan0 is not configured in bridge br0. This is because hostapd will handle this once the access point is ready. So, next step is to configure the access point. For this, edit the file /etc/hostapd/hostapd.conf :

# First part is about configuring the access point and is copied from reference 1
# This part is about setting SSID and WPA2 password
# This line ask hostapd to add wlan0 to the bridge br0

Now we need to tell hostapd to use our config. For that, edit /etc/default/hostapd and set:


Ok, here we go, just reboot the Pi and voilà.

sudo reboot

This article is inspired from following articles :


Featured image by Herbfargus CC BY-SA 4.0, via Wikimedia Commons.

24 Replies to “Using a Raspberry Pi 3 as a Wifi access point and bridge”

  1. Your tutorial is Excellent. But I need setup wifi access point.”Using your new Raspberry Pi 3 as a WiFi access point with hostapd”.

  2. Hi,

    Thanks for your setup. I have tried all your steps for bridging wlan0 and eth0. But if i try to connect the phone to the Pi board I am not getting the ip address for the phone. Can you please help me with it

  3. Mattieu,

    I got the pi-bridge up and running in no time. I do have a problem, and I’m not sure how to resolve it. I can no longer get updates and patches

    When I try to do “sudo apt-get update, or upgrade, the pi-bridge will not connect. I tried to ping it, bu no response.

    Any ideas of what I may try to resolve this?


  4. I must say you have hi quality content here. Your content
    can go viral. You need initial traffic only.

    How to get massive traffic? Search for; Murgrabia’s tools go viral

  5. Thank you! Easy to understand and works (running now). I had looked at other methods which were MUCH more complicated and therefore time consuming.

  6. So the device connecting to the ssid of the AP would be prompted for the password of the external router/dchp server?

    Would all traffic from the device always go thru the ip of the PI AP? Not just traffic directed to the PI AP?

  7. I have noticed you don’t monetize your site, don’t waste
    your traffic, you can earn additional bucks every month because you’ve got high quality content.
    If you want to know how to make extra bucks, search for: Boorfe’s tips best
    adsense alternative

  8. i have problem, my devices cannot connect to the Pi AP, i setted everithing like you but it doesn’t works, what can i do?

  9. Hello. Very well explained tutorial. I followed through all the steps but unfortunately I can’t see the SSID of the AP that I have setup. Any idea what the problem could be? Thanks in advance.

  10. Start by checking hostapd is running using ps.
    Then, maybe try to check that hostapd’s config is suitable for your country, mine is configured for France.

  11. Excuse my ignorance, I have a few questions:
    – Does this work with older PI’s with wifi dongle and does that change the setup? I am useing Rapbian stretch.
    – my wlan0 does not get an inet adress and I get an dhcpcd failure when booting
    – is the IP adress listed to be configured for my lan setup or does this create a sort of secundary LAN. My Lan is setup 192.168.178.xx and my dhcp ranges from 3-98…

  12. Simple and great!

    I have an older USB dongle which does not support




    Without these fancies, it works like a charm. Thanks!

  13. I have noticed you don’t monetize your site, don’t waste your traffic, you can earn additional bucks every month.
    You can use the best adsense alternative for any
    type of website (they approve all websites), for more details simply search in gooogle: boorfe’s tips monetize your website

  14. I’m trying to do this within Raspbian on a Pi3 but Debian Stretch uses dhcpcd.conf for configuring interfaces and not network/interfaces. How does it work then? What goes where? Any chance of an update to the article?

  15. Hi, there is few chance that I update this article one day. However, if you find some resources, send me the links, I’ll add them to the article.

    One final remark. Using the RPi as a repeater showed poor performances and unpredictable failures. I finally replaced it with a cheap repeater.

  16. I see you don’t monetize, don’t waste your traffic, you can earn extra cash every
    month with new monetization method. This is
    the best adsense alternative for any type of website (they approve all websites),
    for more details simply search in gooogle: murgrabia’s tools

  17. Oh my goodness! Incredible article dude! Thanks, However I am having issues with your RSS.
    I don’t know why I cannot join it. Is there anyone else having the same RSS problems?

    Anyone that knows the solution will you kindly respond? Thanks!!

  18. Amazing things here. I am very glad to peer your post.

    Thanks so much and I’m having a look forward to contact you.
    Will you kindly drop me a mail?

  19. My brother recommended I would possibly like this blog.
    He was once entirely right. This put up actually made my day.
    You can not consider simply how a lot time I had spent
    for this information! Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.