Operating Systems

Ubuntu

Depending on the Ubuntu flavor or remote server provider, open the port of your choice for other nodes in the subnet to communicate with your node.


WSL

Making the server directly available

If you have a NAT or a firewall, the mesh template will use relays for NAT/firewall traversal by default, which negatively impacts performance. If your computer has a public IP address, we strongly recommend setting up port forwarding to make the server available directly.

We explain how to do it below:

  1. Create the .wslconfig file in your user's home directory in Windows with the following contents:

    [wsl2]
    localhostforwarding=true
  2. In WSL, find out the inet IP address of your WSL container (172.X.X.X):

    sudo apt install net-tools
    ifconfig
  3. In Windows (PowerShell), allow traffic to be routed into the WSL container (replace 172.X.X.X with the IP address (inet) from step 2):

    netsh interface portproxy add v4tov4 listenport=31330 listenaddress=0.0.0.0 connectport=31330 connectaddress=172.X.X.X
  4. Set up your firewall (e.g., Windows Defender) to allow traffic from the outside world to the port 31330/tcp.

    1. You can also add an inbound rule for the port in the Windows Defender Firewall with Advanced Security settings.

  5. If you have a router, set it up to allow connections from the outside world (port 31330/tcp) to your computer (port 31330/tcp).

In Windows, you can run netsh interface portproxy show all. The WSL IP and port of choice should be shown.

Last updated