I have a hostapd/dnsmasq WiFi network hosted by my Pi Zero W. I have it so I can play multiplayer video games with friends when no WiFi is available. It does not have internet access. For the Nintendo Switch to connect to it and stay connected, it has to be able to ping ctest.cdn.nintendo.net and nasc.nintendowifi.net. I used dnsmasq to made my Pi a DNS server as well that routes those sites to it's own IP address, so the Switch will actually stay connected. I just have the default apache2 "IT WORKS" page, but the Switch thinks it's a captive portal. How can I keep it connected? Is there a special HTTP status code that I should send back that will tell the Switch that it's signed in on the captive portal? Thanks in advance!

  • It will probably think it's signed in when it's able to access Nintendo's real servers! What you have described is a captive portal (i.e. network access gets redirected to some other server). Aug 24, 2021 at 10:38
  • Oh, and it thinks it's being redirected.... I see. Is there any way to make my Pi have the same IP address as nintendo does? Or can it only start with things like 192.168.XXX.XXX and 10.XXX.XXX.XXX Aug 24, 2021 at 23:12
  • 2
    Well, it is being redirected... Since all the Internet is going through the Pi you can make the Pi pretend to have any IP address it wants (it just "pretends" to forward the packet to the Internet server, but actually it's forwarding to itself). However, nowadays it's standard to use encryption and if Nintendo's connection is encrypted you cannot pretend to be them as you do not have their encryption key. Aug 25, 2021 at 0:57
  • @user253751 Thanks! If that were an answer and not a comment, I would mark it as correct... Aug 25, 2021 at 18:38
  • A further issue is that, even if you were somehow able to bypass the encryption (I can't imagine Nintendo would let you since it's part of the DRM scheme, but let's say you could), you can't emulate what their servers actually do. The Switch isn't just contacting the server and going "yup, I'm online" but is using them to authenticate your player data and communicate with your friends. You won't be able to recreate that functionality no matter what you install on your web server, unfortunately. Perhaps you could find games that have a "local" multiplayer mode where they do truly work over LAN?
    – user50441
    Aug 26, 2021 at 2:33

1 Answer 1


What you have set up is a captive portal. A captive portal is when you redirect all the Internet traffic to a portal web page which usually tells you to log in. In this case you have no way to log in, but it's still the same arrangement.

The way you indicate that the user is signed in is by turning the captive portal off, and letting their traffic go to the Internet.

It might be possible to fake Nintendo's servers. Or it might not. It's certainly possible for the Pi to intercept connections that are supposed to go to Nintendo's servers, so they actually go to the Pi itself - that is what you have already done. But nowadays most things on the Internet use encryption, so you cannot pretend to be Nintendo's server unless you know Nintendo's encryption key, which you do not and will not.

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.