sc_o
Posts: 2
Joined: Sun Aug 02, 2020 5:51 pm

Providing Internet from wlan0 to access point running on wlan1

Sun Aug 02, 2020 6:06 pm

Hi, I am working on a project with my Pi3 B+ in which I am trying to set up an access point running on a USB wifi dongle (wlan1) in which the internet from the internal wifi (wlan0) is provided to the connected devices. All the tutorials that I have found describe the process of providing internet through eth0, which doesn't work for what I need. I have tried to adapt the tutorials to work for my use case, but have been unable to make a connection to the internet on my access point.

I've tried a few different tutorials, all of which haven't quite worked for what I am trying to do, and am currently referencing this one in the raspberry pi documentation: https://www.raspberrypi.org/documentati ... -routed.md

So far I have followed that tutorial replacing wlan0 with wlan1 throughout to set up wlan1 as the access point. I am able to connect to the access point with other devices and obtain an IP address, but I am not getting any internet. I have confirmed that the Pi3 is connected to the internet through wlan0 by pinging google.com, so it seems the only thing that is missing is bridging the two in some way.

I've seared around for anyone that has had a similar issue, but so far haven't found an answer that fits or I am not using the right search keywords. Any help is appreciated!

epoch1970
Posts: 5203
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Providing Internet from wlan0 to access point running on wlan1

Mon Aug 03, 2020 9:46 am

In the same guide, you’d also have to replace eth0 with wlan0 and provide a wpa_supplicant.conf file.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

sc_o
Posts: 2
Joined: Sun Aug 02, 2020 5:51 pm

Re: Providing Internet from wlan0 to access point running on wlan1

Wed Aug 05, 2020 4:04 am

Thanks, I completely missed the eth0 in the line

Code: Select all

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Changing it to wlan0 fixed the problem

Return to “Networking and servers”