Homebrew RELEASE yaDNS-NX - Yet another DNS for connect your Switch to your WiFi without internet - In a docker

Dinoster

Member
Newcomer
Joined
Sep 7, 2016
Messages
18
Trophies
0
XP
424
Country
Iceland
Awesome release buddy. I was seraching for something like this for a long time.
One question: Any way to test that it actually works after putting the command?
 
  • Like
Reactions: PsychoRabbit

Catzilla

Active Member
Newcomer
Joined
Feb 23, 2013
Messages
36
Trophies
1
Age
41
XP
634
Country
United States
Awesome release buddy. I was seraching for something like this for a long time.
One question: Any way to test that it actually works after putting the command?

1: check you have passed both local and Internet network checks.
2: Enter eShop (you should fail to load). If you successfully entered eShop then i think you messed up somehow.
3: FTPD and you are able to transfer files to and fro just fine.
 

Clapmaster

Well-Known Member
Member
Joined
Dec 3, 2009
Messages
186
Trophies
0
XP
599
Country
United States
Only problem I got is if you have docker set up to start when you start windows after you power cycle your pc the script doesn't take for some reason and you gotta restart docker. So I just turned off start at login and start it manually.
 

MagicCrafter

Member
Newcomer
Joined
Jul 10, 2017
Messages
5
Trophies
0
Age
28
XP
100
Country
Germany
Is it somehow possible to savely play fortnite on a modded switch? Because my friend has a switch and want to mod it but also want to play fortnite.
And i have a second question: Can i run this on a pi zero?
 

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
Is it somehow possible to savely play fortnite on a modded switch? Because my friend has a switch and want to mod it but also want to play fortnite.
And i have a second question: Can i run this on a pi zero?
You cannot play online with this. Your switch will not know what internet is :P Also is not safe to play any online game if you have modded your switch.
And with the second question, yes, I didn't tested on a RPiZero but it should run docker, so it should work.
 

SaffronXL

The Grand Galactic Inquisitor
Member
Joined
Nov 17, 2016
Messages
340
Trophies
0
XP
1,016
Country
United States
This worked great for me, despite this being my first time using Docker, thank you for the software and concise guide. This makes it easy to transfer files through FTP to the Switch while completely blocking it from the internet using my router's firewall.
 
  • Like
Reactions: PsychoRabbit

Wierd_w

Well-Known Member
Member
Joined
May 12, 2018
Messages
406
Trophies
0
Age
41
XP
651
Country
United States
I would like to implement this kind of functionality in my hacked zsun (since it has sufficient space, and my A5-V11 injector dongle does not), but would like to use lighttpd instead of nginx. Any pointers on how to return proper headers for the query with lighttpd?
 

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
I would like to implement this kind of functionality in my hacked zsun (since it has sufficient space, and my A5-V11 injector dongle does not), but would like to use lighttpd instead of nginx. Any pointers on how to return proper headers for the query with lighttpd?
Never used Lighttpd, but you need to return a http 200 OK with the X-Organization header
Something like this
Code:
$HTTP["host"] =~ "^nintendo\.net$" {
  setenv.add-response-header = ( "X-Organization" => "Nintendo" )
}
And the same for nintendowifi.net, I don't know how can lighttpd return a 200, maybe it can work with a blank .html file or with a "Content-Type" => "text/plain" header.
That from the load balancer's side, but also you will need to serve a DNS server, I'm using bind9/named, I don't know if the zsun can serve a dns server or if can intercept or modify the client's queries.
 

jimbo11

Active Member
Newcomer
Joined
Mar 15, 2009
Messages
28
Trophies
0
XP
307
Country
United States
docker start yadns-nx
Error response from daemon: driver failed programming external connectivity on endpoint yadns-nx (bf55661d97e9d2e2a362be6556934f999dc43df197e672ad0900ee96115b3f27): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE)

Any clue what's happening here? MacOS, connected to internet via ethernet and connected to a local network (with no internet) via wifi. The wifi router is plugged in purely to send things from the Mac to the Switch, it has no WAN access or cables plugged into it or anything. Trying to use the Mac's wifi IP as the DNS. Switch will connect to wifi, but fails internet connection test so it won't let me use that connection.
 
Last edited by jimbo11,

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
docker start yadns-nx
Error response from daemon: driver failed programming external connectivity on endpoint yadns-nx (bf55661d97e9d2e2a362be6556934f999dc43df197e672ad0900ee96115b3f27): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE)

Any clue what's happening here? MacOS, connected to internet via ethernet and connected to a local network (with no internet) via wifi. The wifi router is plugged in purely to send things from the Mac to the Switch, it has no WAN access or cables plugged into it or anything. Trying to use the Mac's wifi IP as the DNS. Switch will connect to wifi, but fails internet connection test so it won't let me use that connection.

From Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE)
It seems that you have something else running at the port 80. This docker needs to use the port 80 and 53. You need to check what service is using that port. Do a
lsof -n -i:80 | grep LISTEN
in a terminal or use netstat or another software to see if you have another process using the port 80. Also check if there isn't another instance of docker already running on that port.
 

jimbo11

Active Member
Newcomer
Joined
Mar 15, 2009
Messages
28
Trophies
0
XP
307
Country
United States
Oh whoops, duh, I have apache running on my computer as a webserver. Hmm...can I just change the html file that I serve up (it currently says "It works!" which I think is just some default apache thing) to include the headers and OK 200 and whatnot, and just not have docker run on port 80?

edit: actually maybe I'll just change the port for apache, might be easier that way because I already know how to do it

edit 2: it worked, now im just gonna end up forgetting to navigate to a different port whenever i use my webserver within my home :-p also is 1.8MB/sec basically my max transfer rate here? seems painfully slow...but I guess I was mostly doing this for novelty's sake anyway...
 
Last edited by jimbo11,

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
Oh whoops, duh, I have apache running on my computer as a webserver. Hmm...can I just change the html file that I serve up (it currently says "It works!" which I think is just some default apache thing) to include the headers and OK 200 and whatnot, and just not have docker run on port 80?

edit: actually maybe I'll just change the port for apache, might be easier that way because I already know how to do it

You may not need my docker after all :P, editing your apache vhosts to manage *.nintendowifi.net and *.nintendo.net with OK 200 and the custom header should be enough, but you will also need to install bind9 for the dns side and you're done.

is 1.8MB/sec basically my max transfer rate here? seems painfully slow...but I guess I was mostly doing this for novelty's sake anyway...
This docker shouldn't affect your bandwidth, it doesn't act as a proxy or any MitM. The service only responds when the Switch ask for nintendo's servers.
 

Wierd_w

Well-Known Member
Member
Joined
May 12, 2018
Messages
406
Trophies
0
Age
41
XP
651
Country
United States
Never used Lighttpd, but you need to return a http 200 OK with the X-Organization header
Something like this
Code:
$HTTP["host"] =~ "^nintendo\.net$" {
  setenv.add-response-header = ( "X-Organization" => "Nintendo" )
}
And the same for nintendowifi.net, I don't know how can lighttpd return a 200, maybe it can work with a blank .html file or with a "Content-Type" => "text/plain" header.
That from the load balancer's side, but also you will need to serve a DNS server, I'm using bind9/named, I don't know if the zsun can serve a dns server or if can intercept or modify the client's queries.

I will see what I can figure out.

The hacked zsun is running openwrt barrier breaker, and has a full implementation of both a DNS server and a full router + firewall implementation. (by default it uses dnsmasq, but bind can also be used. Has a 32mb internal flash, and more than enough processor and ram to run nginx, but I would prefer something lighter, hence the question.

Given the small size of the device (it's about the size of an SX dongle), and the fact that it has a convenient microSD slot (meaning it can function as a poor man's NAS/DLNA server), it is a nearly perfect appliance to live inside the switch's dock on the USB port. (the door will close easily with it installed.)

Before you ask, it is capable of connecting to an SSID, *AND* running another virtual SSID in STA mode, at the same time. The only caveat with that is that both need to be on the same channel. This means it can quietly be a man in the middle for the switch, and when tinfoil gets network install functionality, it can be the go-to device to put NSP files on for network installation.
 

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
I will see what I can figure out.

The hacked zsun is running openwrt barrier breaker, and has a full implementation of both a DNS server and a full router + firewall implementation. (by default it uses dnsmasq, but bind can also be used. Has a 32mb internal flash, and more than enough processor and ram to run nginx, but I would prefer something lighter, hence the question.

Given the small size of the device (it's about the size of an SX dongle), and the fact that it has a convenient microSD slot (meaning it can function as a poor man's NAS/DLNA server), it is a nearly perfect appliance to live inside the switch's dock on the USB port. (the door will close easily with it installed.)

Before you ask, it is capable of connecting to an SSID, *AND* running another virtual SSID in STA mode, at the same time. The only caveat with that is that both need to be on the same channel. This means it can quietly be a man in the middle for the switch, and when tinfoil gets network install functionality, it can be the go-to device to put NSP files on for network installation.

It looks really a great device for the price and size.
Go for the dnsmasq+lighttpd combination, it should be a way to manage custom domains, something like this: https://github.com/RMerl/asuswrt-merlin/wiki/Custom-domains-with-dnsmasq

If you can run also a fusee-launcher listener then it's the potential ultimate device for Switch's hacking haha
+ DNS to block nintendo servers
+ Fusee launcher with interchangeable payload on the microusb
+ FTP and nsp vault

Do a custom 3D printed case and attach a usb C port :P
 

Wierd_w

Well-Known Member
Member
Joined
May 12, 2018
Messages
406
Trophies
0
Age
41
XP
651
Country
United States
Sadly, the device is not self powering, and is also too small for me to do the needed hardware modifications to make the connector face the host. This means it cannot be used as an injector dongle. :(

However, as a waystation for network installed NSPs, a place to stream all that meme-worthy anime from, and a place to do the DNS redirection/nintendo fakeout web services, it more than delivers.

I just used the following guide to get it to "more or less safely" connect to my local access point and do the network bridging with (and provide) the SSID it presents to the wild.
https://wiki.openwrt.org/doc/recipes/ap_sta

Now I just need to add the needed entries for dnsmasq, and configure lighttpd to return the correct x-organization string.

_______edit___________

Ok, OpenWRT wants so terribly to use uhttpd for LuCi, so I am gonna let it. I just moved it to an obscure port to listen on, then installed nginx.

dnsmasq is very easy to add entries for. Successfully set them up, and now nginx returns "ok" on http probes.

Just need to go unplug from the internet, and see if the switch likes the surrogate.
 
Last edited by Wierd_w,

afet

Member
Newcomer
Joined
Apr 29, 2018
Messages
12
Trophies
0
XP
127
Country
Afghanistan
Thanks for creating this and posting the source. I had no prior experience with bind9, but managed to get it working on a debian server on my local network that was already running nginx.
 
  • Like
Reactions: PsychoRabbit

ShaytheStar

3TEETH fan
Member
Joined
Apr 30, 2018
Messages
105
Trophies
0
Age
23
Location
my bed
XP
399
Country
United States
Nice. My only question is...do I have to rerun the command and keep Terminal open every time I use this on my Switch? Sorry if that's a dumb question.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Software update might improve it.