I followed this guide https://pimylifeup.com/raspberry-pi-wireless-access-point/ on how to setup an Ethernet to WiFi access point using the built in RPi WiFi adapter successfully. I connected my phone via the Pi WiFi and could get online.

I then connected my Edimax EW-7811Un WiFi adapter with the hope of using it instead of the Ethernet as the Internet source.

I amended the iptables rules as follows:

sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o wlan1 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan1 -o wlan0 -j ACCEPT

My phone will connect to the RPi built in WiFi but it has no Internet access even though the Edimax adapter is connected to the Internet and I can browse the web from the Pi.

Any thoughts on why the Ethernet adapter will pass traffic but not the Edimax adapter?


  • Have you enabled net.ipv4.ip_forward? Your iptables commands look fine. – PNDA Aug 2 '17 at 7:50
  • Yes I have enabled net.ipv4.ip_forward. When I have eth0 in place of wlan1, everything works fine, but as soon as I change it back to wlan1, no Internet on my connected devices – Chris Aug 2 '17 at 9:30
  • I have this exact setup in my dorm room in the past (wireless to wireless "repeater"). Try checking out my answer here: raspberrypi.stackexchange.com/a/39240/24224 – PNDA Aug 4 '17 at 8:48
  • Using your IP tables rules instead of the ones above seems to have made it work. I didn't need to set the default route or name server. Cheer mate – Chris Aug 4 '17 at 10:01
  • I think there's an error in the tutorial. I could not find any INPUT directive in the iptables commands. Heck, I couldn't find the word "input" in the entire page. Consequently, iptables knows what to forward where, but it's not accepting any traffic (to forward) in the first place. – PNDA Aug 4 '17 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.