Skip to content

Instantly share code, notes, and snippets.

@Nachlor
Last active July 18, 2025 08:07
Show Gist options
  • Save Nachlor/fdf2a5f9de1c14aecfc4c8617401a2f3 to your computer and use it in GitHub Desktop.
Save Nachlor/fdf2a5f9de1c14aecfc4c8617401a2f3 to your computer and use it in GitHub Desktop.
Lanemu P2P VPN LAN Gaming

Mirror

Table of Contents

Preparations (Linux)

Preparations (Windows)

  • Disable SSDP Discovery
    • Open Control Panel
    • Click System and Security
    • Click Administrative Tools
    • Open Services
    • Right click SSDP Discovery and select Properties
    • Click Stop
    • Startup type: Disabled
    • Click Apply and OK
  • Enable DirectPlay and Media Features
    • Open Control Panel
    • Click Programs
    • Click Turn Windows features on or off
    • Expand Legacy Components
      • Check DirectPlay
    • Check Media Features
    • Click OK
  • Allow DirectPlay and game through Windows Firewall
    • Open Control Panel
    • Click System and Security
    • Click Allow an app through Windows Firewall
    • Click Change settings
    • Click Allow another app
    • Click Browse
      • DirectPlay
        • Go to C:\Windows\SysWOW64
        • Select dplaysvr.exe and click Open
      • DirectPlay 8 (x32)
        • Go to C:\Windows\System32
        • Select dpnsvr.exe and click Open
      • DirectPlay 8 (x64)
        • Go to C:\Windows\SysWOW64
        • Select dpnsvr.exe and click Open
      • Game
        • Go to game directory
        • Select game executable and click Open
    • Click Network types
      • Check Private and Public
      • Click OK
    • Click Add
    • Click OK
  • Optional recommendations

Usage

  • Get the latest Lanemu release by clicking Download under Packages
  • Extract the downloaded Lanemu archive to a new folder called Lanemu
  • Navigate to the OpenJDK page by clicking "Ready for use" JDK version
  • Download OpenJDK
  • Extract the downloaded OpenJDK archive to Lanemu -> build folder
    • Rename the extracted OpenJDK folder to jdk
  • Windows : Install Lanemu network adapter
    • Navigate to Lanemu -> driver folder
    • Right click add_adapter.bat
    • Click Run as administrator
  • Windows : Make sure Lanemu.exe is always run as administrator
    • Navigate to Lanemu -> build folder
    • Right click Lanemu.exe
    • Click Properties
    • Select Compatibility tab
    • Check Run this program as an administrator
    • Click Apply and OK
  • Launch Lanemu
    • Windows
      • Open Lanemu.exe
    • Linux
      • Open the Terminal in Lanemu -> build folder
        • sudo ./jdk/bin/java -jar Lanemu.jar
  • Do you want to join 'Default network'?
    • Click No
  • Click the Options icon and select Global tab
    • Specify Your Name
    • Specify any port in "Listen on Port" (e.g., 6666)
      • At least one user should enable UPnP or forward this port on the router
        • It is recommended to forward this port for both TCP and UDP
        • If you wish to only use TCP
          • Select Network tab and uncheck Use UDP for peer to peer traffic
      • If nobody can forward a port (stuck behind NAT)
    • Click OK
  • Steps for Host PC
    • If you are using hyper-nat
      • Modify hyper-nat options.json file
        {
            "schema": [
                {
                    "mode": "server",
                    "proto": "udp",
                    "port": "6666",
                    "host": "127.0.0.1",
                    "secret":"SomeUniqueTextThatIsTheSameForAllPorts"
                },
                {
                    "mode": "server",
                    "proto": "tcp",
                    "port": "6666",
                    "host": "127.0.0.1",
                    "secret":"SomeUniqueTextThatIsTheSameForAllPorts"
                }
            ]
        }
      • Launch hyper-nat
        • Windows
          • Open hyper-nat.exe
        • Linux
          • Open another Terminal in Lanemu -> build -> hyper-nat-main folder
            • npm install
            • npm run start
      • Windows : Allow hyper-nat through Windows Firewall
        • Check both Private and Public networks
        • Click Allow access
      • Copy your public key from the Console / Terminal
        • Windows
          • Highlight it and press CTRL + C
        • Linux
          • Highlight it and press CTRL + SHIFT + C
      • Send your public key to every Client
    • Create a network
      • Click the New Network icon
      • Select Simple tab
        • Specify Network Name
      • Select Advanced tab
        • If you are using UPnP / Port Forwarding or Tunneling Services
          • Specify your PublicIP:Port or TunnelIP:Port in Known Hosts
            • Example: 82.129.80.111:6666 or tcp-tunnel.gl.at.ply.gg:5359
        • If you are using hyper-nat
          • Specify these network settings
            • Known Hosts: 127.0.0.1:6666
            • BitTorrent Tracker: Empty
            • Enable DHT search for peers: No
      • Click OK
    • Windows : Allow OpenJDK through Windows Firewall
      • Check both Private and Public networks
      • Click Allow access
    • Create an invitation
      • Click the Invite Someone icon
      • Check Allow invitation of others
      • Click Generate Invitation
      • Click Save to a File
      • Click Close
    • Send the invitation file to every Client
  • Steps for Client PC
    • If you are using hyper-nat
      • Temporarily close Lanemu
        • Right click Lanemu tray icon and select Quit
      • Modify hyper-nat options.json file
        {
            "schema": [
                {
                    "mode": "client",
                    "proto": "udp",
                    "port": "6666",
                    "serverport": "6666",
                    "publicKey":"CopyPasteTheServerPublicKeyHere"
                },
                {
                    "mode": "client",
                    "proto": "tcp",
                    "port": "6666",
                    "serverport": "6666",
                    "publicKey":"CopyPasteTheServerPublicKeyHere"
                }
            ]
        }
      • Launch hyper-nat
        • Windows
          • Open hyper-nat.exe
        • Linux
          • Open another Terminal in Lanemu -> build -> hyper-nat-main folder
            • npm install
            • npm run start
      • Windows : Allow hyper-nat through Windows Firewall
        • Check both Private and Public networks
        • Click Allow access
      • Wait until hyper-nat establishes connection to the server
        • The window closes if connection fails, you might have to retry several times
      • Relaunch Lanemu
    • Join a network
      • Click the Accept Invitation icon
      • Click Load from File
      • Click OK
    • Windows : Allow OpenJDK through Windows Firewall
      • Check both Private and Public networks
      • Click Allow access
    • Wait for connection
      • If connection did not occur automatically
        • Click the network information icon in the bottom right corner
        • Select Connections tab
        • If you are using hyper-nat
          • Enter 127.0.0.1:Port (e.g., 127.0.0.1:6666) next to the Connect To button and click it
        • If you are not using hyper-nat
          • Enter other user's PublicIP:Port or TunnelIP:Port next to the Connect To button and click it
  • Linux : Open another Terminal to add Broadcast and Multicast routes
    • sudo ip route append 255.255.255.255/32 via 0.0.0.0 metric 0 dev tap0
    • sudo ip route append 224.0.0.0/4 via 0.0.0.0 metric 0 dev tap0
@Darthagnon
Copy link

Darthagnon commented Jul 8, 2025

You may be interested in mDNS/Bonjour/Avahi (v2.0.2 standalone, v3.1.0.1 is included with iTunes and can be extracted from the installer) - this allows addressing LAN computers by computername.local rather than by constantly changing IP addresses.

@Darthagnon
Copy link

May I republish your instructions (crediting you, and linking back to here) on my blog?

@Nachlor
Copy link
Author

Nachlor commented Jul 8, 2025

May I republish your instructions (crediting you, and linking back to here) on my blog?

Sure, go ahead :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment