I have an issue setting up my wifi adapter. To initally set up my raspberry pi zero w I used an old Wifi Pineapple from Hak5 to give the rpi W access to the internet. The Wifi Pineapple uses internet sharing over usb and the rpi w accepted this as the eth0 connection, so I could use the rpi's built-in wifi to broadcast my captive portal setup. I used the following guides:

Setting up access point: https://pimylifeup.com/raspberry-pi-wireless-access-point/

Configuring Captive Portal with Nodogsplash: https://pimylifeup.com/raspberry-pi-captive-portal/

Now, I am using my Wifi Pineapple for another project and I can't attach it to the rpi w. I bought a wifi dongle to still provide the rpi w with wifi, but all guides show how to setup the wifi dongle as the wlan0 interface. I want to configure the dongle so that the rpi w thinks it as eth0, as wlan0 is reserved for serving the access point and captive portal.

Is this possible and if yes, how?

Thank you

EDIT: To clarify. The adapter has to appear as eth0 to the rpi zero w, as the captive portal is expecting a bridge from eth0 to wlan0 (the broadcasted network using the rpi's built-in wifi chip). The wifi input (dongle) has to be eth0.

2 Answers 2


I’ve not tried this but I think this maybe what you need assuming you are using Stretch or Buster.


Also at udev systemd.link

Example 2 shows:

This example assigns the fixed name "dmz0" to the interface with the MAC address 00:a0:de:63:7a:e6:

[Match] MACAddress=00:a0:de:63:7a:e6 [Link] Name=dmz0

I personally would make sure both MAC addresses are mapped and have a backup of the SD card (or two)...


I haven't heard before from an USB/WiFi dongle that emulates a wired connection eth0. Normally a wireless interface, used for a client uplink connection, cannot be added to a bridge. This is only possible with wired connections. For further information you may have a look at Raspberry Pi WiFi to Ethernet Bridge Anyway, with your nice dongle it seems to be possible that the RasPi accepted it as wired connection so you can bridge it.

But that is also the problem if you use a normal USB/WiFi dongle. It can only present a WiFi interface that cannot be bridged. It will not help to just rename its interface name. You have to use one of the workarounds given in the link.

  • I've found a possible solution: '''ip link wlan1 eth0'''. I can't try this now though, will have to wait until next week. Wlan1 would be the dongle, eth0 would be where the connection goes. I'll let anyone here know if this worked. Commented Mar 30, 2020 at 13:40
  • @CasparNuel The old USB/WiFi Adapter, that emulates a wired connection, is very interesting. Can you please give me the exact type and name, so I can look at it on the web?
    – Ingo
    Commented Apr 1, 2020 at 9:43
  • it's not old, it just isn't really a WiFi adapter. I'm using the "Hak5 WiFi Pineapple Nano". It's a "computer" on its own that runs tool designed for hosting and auditing wireless networks, and it has a "WiFi adapter" setting. When I plug it in to my rpi 0 and enable the adapter setting, my raspberry detects it as eth0 rather than wlan1 Commented Apr 1, 2020 at 11:56
  • @CasparNuel You plug it into the RasPi with an ethernet cable, isn't it?
    – Ingo
    Commented Apr 1, 2020 at 12:01
  • No, it's just like a usb stick, and it plugs into the usb-hub I have attached to my RasPi Commented Apr 1, 2020 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.