I want to use a RPi Zero W as a completely wireless router. The built-in wireless device (wlan0) will be used to provide a local wireless network, and a secondary usb wireless device (wlan1) will be used to connect to a WAN. (rough diagram below) That is, I want to share the internet connection of the usb wireless device to the internal network created by the built-in wifi device.

xxx.xxx.xxx.xxx (WAN) <---> wlan1 <---> RPi W <---> wlan0 <---> 10.3.141.* (local network)

Steps I figured out so far:

  1. Stash any current wifi connection config.

sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf.sav sudo cp /dev/null /etc/wpa_supplicant/wpa_supplicant.conf

  1. Install RaspAp and Reboot

sudo wget -q https://git.io/voEUQ -O /tmp/raspap && bash /tmp/raspap

(after reboot, the new WiFi network created by RaspApp should be available, connect to it)

  1. Re-enable WiFi Config

sudo cp /etc/wpa_supplicant/wpa_supplicant.conf.sav /etc/wpa_supplicant/wpa_supplicant.conf

  1. Reboot Again

sudo reboot

(at this point wlan0 should be providing the internal network, and wlan1 should be connected to the network defined in the credentials in wpa_supplicant.conf)

  1. Make wlan0 and wlan1 communicate with each other

And this is the step I am missing.

If I "ping -I < name of wlan1 interface >" I get a connection, so every adapter is doing what is supposed to. The issue here is make wlan0 re-route traffic from the internal network to the external one, wlan1, when necessary.

OS: Raspbian Stretch Lite

Hardware: RPi Zero W + WiFi Dongle

Software: RaspAP 1.5.1

  • @DmitryGrigoryev Going to see if there is something I can use, but the issue is different. That entry is about creating a repeater. What I want to achieve is different. The RPi Zero W is the Router, provides its own independent network and uses wlan1 to provide the internet connection.
    – user105052
    Jun 21, 2019 at 12:50
  • Perhaps @Ingo should replace the word "repeater" with "router", because that's exactly what his setup is usually called. Make sure you read his post before telling me that you want to do something different, because (barring the odd "repeater" name and a different choice of the IP range) I don't see any difference at all. Jun 21, 2019 at 13:54
  • Did not meant to be misinterpreted. I did read, albeit not with detail, so ofcourse I can be wrong. But the thing that made me say it is different, is that there is no secundary wifi adapter (wlan1) as I have (also the reason i did not use the word 'repeater'). So albeit it might be a slight difference, it does make this not a duplicate. Either way, I will ofcourse indicate the solution, and mark this as duplicate if there are no substantial changes.
    – user105052
    Jun 21, 2019 at 15:24
  • Possible duplicate of Access point as WiFi router/repeater with additional WiFi-dongle. In correction to the pointed duplicate from @DmitryGrigoryev, here is the duplicate that exactly fits your need.
    – Ingo
    Jun 21, 2019 at 18:13
  • Definitely! Will try to integrate the solution with RaspAp. If I am not able, will just try it and if it works mark this as a duplicate. :)
    – user105052
    Jun 21, 2019 at 18:45


Browse other questions tagged or ask your own question.