Hacking Gaming Hardware VPN and tunneling.

  • Thread starter Thread starter korn16ftl3
  • Start date Start date
  • Views Views 1,219
  • Replies Replies 11
  • Likes Likes 1

korn16ftl3

Well-Known Member
Newcomer
Joined
Nov 15, 2008
Messages
64
Reaction score
76
Trophies
1
XP
401
Country
United States
Here’s the story let’s see if anyone has done something similar and can help.

My friend the next town over and I have very conflicting work schedules and would like to trade Pokemon for Pokemon shield and sword. His system is not modified in any way and I’m running CFW 20.5.0.

What I would like to accomplish is to run a VPN server on a raspberry pi (I have a 3b+ laying around) and have him connect to my VPN from his OFW switch.

I know there are programs and such like xlink-Kai that require the use of a computer in between for each console but the only thing my fried really has that he is able to use is his game consoles (no pi no pc or laptop or anything like that).

I was wondering how I would make it so that he would just have to enter the IP for my VPN in his internet settings to access my network so we can be on LAN play together or if there was another way to accomplish this.

Thank you all in advance for your time and input.
 
  • Like
Reactions: Kapeas
Currently you can only trade locally on CFW Switch, you can't take it online or it would just get banned. There is no way to simulate a local trade for someone far away, the best thing you can do is buy a unmodded switch trade from modded to unmodded then trade to your friend.
 
Currently you can only trade locally on CFW Switch, you can't take it online or it would just get banned. There is no way to simulate a local trade for someone far away, the best thing you can do is buy a unmodded switch trade from modded to unmodded then trade to your friend.


If that were the case how does xlink-Kai work?

It functions as a way to make a console think that it is on a local area connection.

You can’t connect to Nintendo servers with cfw but you can connect to the internet as well as play games that are LAN enabled (I’ve played borderlands via LAN before with my cfw)
 
If his router supports VPN he could connect his appliance to your VPN host and through vlan it would look like you're on the same network, but it's a complicated setup.
 
Interesting…Pokemon sword and shield only supports local wireless…hmm
Post automatically merged:

Weird because this also says it supports LAN….
Post automatically merged:

If his router supports VPN he could connect his appliance to your VPN host and through vlan it would look like you're on the same network, but it's a complicated setup.


This was kind of my thoughts but I didn’t know if I set up a vpn on my network and have him connect to my network through that (by inputing my vpn as his DNS?) would work.

There are ways to set up a VPN with a raspberry pi so I could easily do that with what I have here but does he absolutely have to have hardware on his end or can it be as simple as him editing his DNS on his internet settings for his switch to connect to me?
 

Attachments

  • IMG_1835.png
    IMG_1835.png
    343.1 KB · Views: 21
  • IMG_1836.png
    IMG_1836.png
    327.4 KB · Views: 21
Interesting…Pokemon sword and shield only supports local wireless…hmm
Post automatically merged:

Weird because this also says it supports LAN….
Post automatically merged:




This was kind of my thoughts but I didn’t know if I set up a vpn on my network and have him connect to my network through that (by inputing my vpn as his DNS?) would work.

There are ways to set up a VPN with a raspberry pi so I could easily do that with what I have here but does he absolutely have to have hardware on his end or can it be as simple as him editing his DNS on his internet settings for his switch to connect to me?

Look like you found your answer, easiest would just get a unmodded switch to trade with your modded switch.
 
Here’s the story let’s see if anyone has done something similar and can help.

My friend the next town over and I have very conflicting work schedules and would like to trade Pokemon for Pokemon shield and sword. His system is not modified in any way and I’m running CFW 20.5.0.

What I would like to accomplish is to run a VPN server on a raspberry pi (I have a 3b+ laying around) and have him connect to my VPN from his OFW switch.

I know there are programs and such like xlink-Kai that require the use of a computer in between for each console but the only thing my fried really has that he is able to use is his game consoles (no pi no pc or laptop or anything like that).

I was wondering how I would make it so that he would just have to enter the IP for my VPN in his internet settings to access my network so we can be on LAN play together or if there was another way to accomplish this.

Thank you all in advance for your time and input.
switch-lan-play works with Sword/Shield ("Press [L] + [R] + [Left Analog] in the options menu.")

It should be possible to host the lan-play software over a VPN so he can connect to it without requiring a PC to run it himself but this is largely uncharted territory so you won't find many people able to help you with troubleshooting it if it doesn't work.

The easiest most failsafe way to make it work would probably be to use the router itself as the VPN client since this exposes the VPN devices on the LAN as if they were connected directly to the LAN and there is a good chance it will just work.

Other ways to have the Switch able to communicate over a VPN would probably require a PC anyway since the Switch itself can't act as the VPN client, you would need a device that acts as the VPN client and supports connection sharing/bridging (as both Windows and Linux do), then the VPN connection needs to be bridged to the LAN and you need to set the default gateway on the Switch to point to that device so that the device acting as the VPN client handles routing the connection instead of the router. Maybe an Android device or something would be capable of filling this role but I am not sure, it's much easier to go the router way anyways.

It might actually be possible to run the lan-play client on an Android device rather than a PC. It would have to be compiled for ARM though.
Edit: I cannot vouch for this, I have not read the code and I have no idea where the tinyurl link it tells you to use is pointing to, but this is a thing that exists, it may or may not work for your friend (requires root): https://github.com/janAkali/android-lan-play
Edit: I had a quick look at the script, it seems legit, the tinyurl link is pointing to the same script in the repo (though where the link points to could change at any time), it is a pretty simple script that just builds/runs the lan-play client on Android from the official switch-lan-play repo. So it's worth a try if your friend has a rootable Android device (an old phone is good enough as long as it runs Android 7.0+)
 
Last edited by The Real Jdbye,
  • Like
Reactions: Kapeas
Really interesting topic. I guess you would need a ssh -t equivalent in raspberry, and being able to connect to a router (your raspi acting as one) that routes your switch requests through the desired vpn and tunnels, but not sure if those kind of tools are availale. EDIT5: After re-reading, this approach won't be possible unless you publish the vpn server access to allow your friend to connect to it. And he would need a vpn client (or a router able to connect to that vpn client). No need for tunneling here I think.

SSH linux docs (should work on raspberri linux, not sure)
https://linuxize.com/post/how-to-setup-ssh-tunneling/

Also, even if you dont want to connect your cfw to internet, you can create an access point from your smartphone (to act as router) with no 3/4/5g and have you and your friend connected to the same network (if any of you visit the other hehe), even if it does not have internet. Should do the trick unless is an internet relying game. ;)

Edit6: I can't beleive I am saying this, but, maybe "easier" in windows if you two have ethernet and wifi on your laptops/pcs. Both of you have the same vpn client installed in windows, connect to it through ethernet or wifi. The person acting as server, uses the other network interface(wifi/ethernet cable) as server. The person acting as client, would use his windows as a router, creating access point (windows acting as wifi routher) once connected to the vpn client. May require some additional setup, but, shouldn't. Does not sound too easy after typing it, but maybe the idea help.

Keep us posted please, don't see many posts like this often. Ty.
Regards and happy findings :)
 
Last edited by Kapeas,
It’s seeming like the easiest way and designed way for Pokemon to work with trading and such is threw local wireless which I’m guessing is via the infared sensor on the joycon?

Also I found the LAN setting.
 

Attachments

  • IMG_1839.jpeg
    IMG_1839.jpeg
    1.3 MB · Views: 23
Last edited by korn16ftl3,
  • Like
Reactions: Kapeas
It’s seeming like the easiest way and designed way for Pokemon to work with trading and such is threw local wireless which I’m guessing is via the infared sensor on the joycon?
local wireless sounds like any LAN to me (e.g your home wifi, smartphone created ap, windows created ap) Does not need to have internet to be a network. Local word supports that hypothesis hehe. Not sure tho. Not much a pokemon guy.

Also, I had the same problem to play GT4 on PS, trying to remember the software I used on pc to connect two remote consoles as the same LAN.
EDIT: Yes, I remembered after some searches hehe.
Hamachi might help you :)
https://vpn.net/ (HAMACHI)

(zipped msi installer)
(.msi installer, windows)
 
Last edited by Kapeas,
local wireless sounds like any LAN to me (e.g your home wifi, smartphone created ap, windows created ap) Does not need to have internet to be a network. Local word supports that hypothesis hehe. Not sure tho. Not much a pokemon guy.

Also, I had the same problem to play GT4 on PS, trying to remember the software I used on pc to connect two remote consoles as the same LAN.
EDIT: Yes, I remembered after some searches hehe.
Hamachi might help you :)
https://vpn.net/ (HAMACHI)

(zipped msi installer)
(.msi installer, windows)



From a quick google…it looks similar to the way the PSP did their local games I think. I will have to do some more research and compare but it does sound very similar if I’m recalling correctly

The Nintendo Switch uses direct ad-hoc Wi-Fi for local wireless multiplayer, allowing consoles to connect directly without a router or internet connection. This system utilizes 2.4 GHz and 5 GHz Wi-Fi bands (802.11a/b/g/n/ac) to establish a close-range, high-speed connection between devices. [1, 2, 3, 4, 5, 6]
Key details regarding local wireless:

• Ad-Hoc Network: It creates a private, direct connection between nearby Switches, bypassing the need for a router.
• Wi-Fi Frequencies: The system utilizes both 2.4GHz and 5GHz Wi-Fi for communication.
• Performance: It uses 2x2 MIMO technology and supports up to 802.11ac for faster data transfer, but can be susceptible to interference from other wireless devices.
• Limitations: Local communication (used for multiplayer) may disable Bluetooth audio functionality.
Post automatically merged:

Findings on a quick google for PSP ADHOC:

Yes, the PlayStation Portable (PSP) heavily utilizes Ad Hoc mode for direct, local wireless multiplayer, allowing systems within ~15 feet to connect without an internet router. This peer-to-peer connection is built-in and supports local gameplay, file sharing, and, in some cases, game sharing.
Key details regarding PSP Ad Hoc:

• Direct Connection: Unlike infrastructure mode (which uses Wi-Fi), Ad Hoc connects PSPs directly to each other.
• Game Support: Games requiring this feature usually state "Wi-Fi Compatible (Ad hoc)" on the packaging.
• Alternative Solutions: While natively local,, tools like {Link: Ad Hoc Party (https://www.gamespot.com/articles/video-qanda-sony-explains-psp-adhocparty/1100-6240897/)} on the PS3 allowed some Ad Hoc games to be played online.
• Emulation: The PPSSPP emulator (https://www.reddit.com/r/SBCGaming/comments/18mqoef/dont_sleep_on_ppsspps_adhoc_feature_lets_create/) also supports this feature to enable multiplayer on modern devices.
Post automatically merged:

Now….xlink-Kai with a psp IS possible also so that means this should be just the same as it is the same technology….
 

Attachments

  • IMG_1841.png
    IMG_1841.png
    337.9 KB · Views: 22
  • IMG_1842.png
    IMG_1842.png
    337.3 KB · Views: 15
  • IMG_1843.png
    IMG_1843.png
    310.5 KB · Views: 18
  • IMG_1844.png
    IMG_1844.png
    546.3 KB · Views: 18
Last edited by korn16ftl3,
  • Like
Reactions: Kapeas
So I did a google search on how to use raspberry pi OS as an AD-HOC to internet bridge and came up with the following:

To use a Raspberry Pi as an ad hoc-to-internet bridge, configure the Ethernet port ($eth0$) to connect to a router and the Wi-Fi ($wlan0$) in Access Point (AP) mode using and . Bridge these interfaces by editing to deny wlan0/eth0, creating in , and configuring IPv4 forwarding to pass traffic.
Steps to Create an Ad Hoc/Bridge Connection

1. Update and Install DependenciesEnsure the system is updated, then install the necessary bridging and access point software:
2. Configure Bridge InterfaceEdit to define the bridge ($br0$) and add interfaces to it:
3. Add or modify to include:
4. Configure Hostapd (Wi-Fi Access Point)Create a configuration file for the wireless network:
5. Add the configuration (change and ):
6. Enable Packet ForwardingEnable IPv4 forwarding to allow internet traffic to pass through:
7. Apply changes:
8. Restart Services

Alternative: NetworkManager (Modern Raspberry Pi OS)
For newer OS versions, using is recommended:
Note: Ad hoc mode (IBSS) is rarely used now; creating a wireless access point bridged to Ethernet achieves the same goal of connecting devices to the internet.


From here I searched up how to run Xlink-Kai on a raspberry pi and got the following link:
https://www.teamxlink.co.uk/wiki/Installing_on_Raspberry_Pi


So I’m thinking that this should be possible even tho xlink-Kai does not officially support Nintendo switch you should still be able to use it to connect and see each other as the lobby’s and such only exist for people that want to play the same game to see each other and as long as you have the same game and same software version and things like that it dosnt really know har console or game is connecting threw the lobby (I’ve set up lobby’s for other game on different platforms than what I was playing on in the past back in the og Xbox days unsure if this is still true or not).

With all of this being noted who else here has a pi (or any other compatible hardware) laying around and fairly good at using Linux and is a tech savvy enough to understand all of these things to put 2 and 2 together to make it a reality?

I myself am going to monkey with it but I’m not technical on this level to be able to completely understand all of it or how to track down communication errors or things like that….also I need someone else to do this with to try to connect to.

Anyone wanting to participate in this at all that can be good guidance and a partner in making this a manageable way for CFW users to play online in this fashion?

Note:
I’m simply suggesting using xlink-Kai to remove potential user error in setting up a vpn or any other software for p2p connection. This should help narrow down other settings and things of that nature as xlink-Kai is already a tested and working tunnel software solution with the only thing needed is a way for a platform to connect to it.
Post automatically merged:

Another interesting find from Google even though it really only appears to apply to modified/cfw switches:

Nintendo Switch homebrew ad-hoc networking is primarily achieved through sysmodules like ldn_mitm, which converts local wireless (ad-hoc) communication into LAN-play, allowing for bridged multiplayer over the internet or LAN. It requires Atmosphere custom firmware to run these tools, often used in conjunction with tools like Switch-LAN-Play.
Ad-Hoc/Local Networking via Homebrew

• ldn_mitm: A system module that allows for "LAN-play" on games that only support local wireless (Ad-hoc) play.
• Functionality: It tricks games into believing other players are on the same local network, facilitating multiplayer without Nintendo servers.
• Usage: It is typically utilized alongside for broader network connectivity.

Requirements and Setup

• Custom Firmware (CFW): Atmosphere is required to run homebrew applications and system modules.
• Homebrew Menu: Accessible via the Album application to launch apps (.nro files).
• Installation: Involves setting up the SD card with necessary files, often using tools like TegraRcmGUI for unpatched consoles.
• Compatibility: Most homebrew works on first-generation (V1) consoles, while patched consoles require specialized hardware installation.

Common Homebrew Tools

• NX-Shell: File manager for manipulating files on the SD card.
• Sys-netcheat: A tool for game cheating.
• Sys Play / xor:Play: System modules for background music.

For detailed development and documentation, resources like the NH Switch Guide (https://switch.hacks.guide/) and GitHub repositories (https://github.com/noahc3/Homebrew-Guide/blob/master/homebrew_dev/introduction.rst) are primary sources.

Does anyone have anymore information on this?

It sounds to me that this has been sort of accomplished by spoofing local wireless games (Ad-hoc multiplayer) into using LAN somehow.

I’m going to do some more research on this part even tho it does not actually apply to what I’m trying to achieve directly it would be a way for those with CFW to use vpn’s and tunneling software like xlink-Kai to play together which would still be a gain in my book even if I can’t accomplish exactly what I’m after.
Post automatically merged:

Turned this up after googling the previous mentioned sysmodule ldn_mitm:

https://github.com/spacemeowx2/ldn_mitm
Post automatically merged:

Apparently xlink-Kai has covered the us of sysmodule ldn_mitm here:

https://www.teamxlink.co.uk/wiki/Nintendo_Switch_ldn_mitm_setup

It would still be interesting to accomplish getting a vanilla Nintendo switch to connect to a pi via Ad-hoc (local wireless mode) to then connect to the internet and eliminate the requirement for a CFW/chipped switch for online play
Post automatically merged:

It should be noted that apparently enabling LAN through the options menu is supported for Pokemon Sword and Shield. Knowing this having my friend connect to my local network threw a vpn that I can set up (or alternatively I can preconfigured a pi for him that boots Xlink-Kai) should work for him and I to trade and battle and things like that….note I said “SHOULD”.

It appears to me that there are several solutions to play various switch games in an online fashion which to me is exciting because I can use multiplayer without actually having to leave my home or make room in my busy schedule to meet up with someone.

Source: Google AI

Pokémon Sword and Shield can be played online via XLink Kai by utilizing the game's built-in LAN mode, allowing for features like trading and max raids without a Nintendo Switch Online subscription. The setup requires a PC/Mac to bridge the connection, with the Switch connected to the same network.
How to Play Pokémon Sword/Shield on XLink Kai:

• Setup: Register for an XLink Kai account (https://www.teamxlink.co.uk/wiki/Nintendo_Switch_XLink_Kai_Setup) and download the software.
• LAN Mode: Inside Pokémon Sword/Shield, activate LAN mode by pressing L, R, and the Left Stick simultaneously on the Y-Comm menu.
• Connection: Ensure your Switch and computer are connected to the same network. Open XLink Kai and navigate to the Switch -> Action -> Pokémon Sword/Shield arena.
• Gameplay: Search for trades or raids within the game's Y-Comm, which will now look for local/LAN users connected through XLink.

Key Notes:

• This method is ideal for finding players, trading, and doing raids.
• The game is fully supported on XLink Kai.
• Ensure your network setup is correct, as indicated by the "Configured OK" message in XLink metrics.
 
Last edited by korn16ftl3,
  • Like
Reactions: Kapeas

Site & Scene News

Popular threads in this forum