First time poster here. I do a good bit of scripting for work and wanted to share my version of the Linux script. First, I wanted to thank those that made the original guides as they put the groundwork down for my script.
I'm very security minded but lazy so I wanted something that would be secure and make it so that I didn't need to unset my default 3DS Wi-Fi connection. I also wanted to be able to choose one relay at a time from a list so I don't fill my Plaza queue and just cycle through needlessly like the other scripts. I also added the BestBuy SSID as an option for events like bonus items in Animal Crossing.
I did not encode anything as I wanted this to be easily customizable so you can tune it to your own needs. I will explain how along the way.
I have a spare notebook with ethernet out, built-in wi-fi in. I'm using Mint but any Ubuntu based Debian distro will work just fine... I just prefer Mint because it comes with Cinnamon by default and doesn't assume you're an idiot like Unity.
The goal is that this notebook will run 24/7 as a secure access-point for mine and my wife's 3DS.
First you will need to do the same thing as any other Linux setup and add the following to the top of /etc/dnsmasq.conf with gedit, vim, nano, w/e:
Next, install some required programs:
sudo apt-get install dnsmasq
sudo apt-get install hostapd
sudo apt-get install macchanger
Choose a folder where you want to store everything. Anywhere in your home folder is fine, I chose /home/username/Documents. Now you will create 3 .conf files to use with hostapd.
gedit streetPass.conf
gedit bestbuy.conf
gedit ndsRouter.conf
For the ndsRouter.conf make sure you choose your proper country code, an SSID that is different from your regular home router, and a passphrase with at least 16 characters.
Next are the two bash scripts.
gedit ndsRouter.sh
And finally, the main script.
gedit streetPass.sh
On line 77, put your own wi-fi adapter's MAC address. You can find this with ifconfig before doing any changes, or sudo macchanger -p
On Ubuntu based distros, you may find that the Network Manager utility will interfere with your setup and tell you there is an error with the nl80211 driver. In this case, add the following lines to /etc/NetworkManager/NetworkManager.conf:
[keyfile]
unmanaged-devices=mac:yourwifiapmacaddress
This will force Network Manager to leave your wi-fi nic alone.
Once you've made all the files do a chmod +x on ndsRouter.sh and streetPass.sh
You can easily modify the listed MAC addresses or add more. Just look at the syntax for lines 65-77 and make another line with the next number in sequence. Then go to what was line 99 and change the 7 to whatever the highest number in sequence. You may also want to add your MACs to the list (lines 29-35).
There is a usage statement if you forget, but basically it's "sudo ./streetPass.sh #"
# being the relay you want to load. For a list of them, try "sudo ./streetPass --list"
There are a number of sanity checks in the script... making sure you ran with root privs and input validation so as not to break anything.
The script will setup a street pass relay of your choice for 60 seconds (more than enough time for old and new 3ds to register), then automatically switch over to your WPA2 secured hotspot... Just add this hotspot as your only connection on you 3ds and you will never have to switch around again. If you reboot/crash/whatever and just want your AP, do "sudo ./ndsRouter.sh" If you want to use your relay again, just ctrl+c run streetPass.sh
Hopefully that wasn't too long-winded and helps anyone who was concerned with having unsecured wifi leaking from their home. Let me know if you have any questions.
This all seems great, but I have a query. Have you actually tried the BestBuy part of the script? The reason I ask is that the 3DS is expecting the Bestbuy Zone to be a protected network with a specific passkey, which you haven't set up hostapd to use. Without that, the 3DS won't connect automatically and you won't be able to access the Nintendo Zone Viewer properly as it will throw up an error. This is because Nintendo Zone Viewer actually disassociates from a network, ignores your saved network configs and tries to establish a connection again with the credentials it expects and fails if they aren't correct.
You can get the key for the Bestbuy zone by dumping your system following the guide Arkansaw has posted in the tutorials section if you want to set up the zone correctly.
Otherwise, this is actually a great guide for Linux users to follow as its simple and requires little to no configuration (unless nl80211 isn't the correct driver for their system but then hostapd should let them know ) since they can essentially just copy+paste. You could make it easier by hosting it on GitHub for users to have a one-click solution, but that's just my little suggestion . Thanks for the guide and welcome to GBATemp!