Skip to content

Network Settings ​

WSL Dashboard simplifies network communication between WSL 2 and the host (Windows), supporting port forwarding and a global HTTP proxy.

Port Forwarding ​

Because WSL 2 uses a virtual network adapter, accessing services inside WSL from other devices on the LAN is usually complicated.

  • Core function: You can map specific Windows ports to ports inside a WSL instance.
  • Automatic firewall rules: When creating a forwarding rule, WSL Dashboard automatically adds the necessary inbound rules to the Windows Defender Firewall, ensuring external traffic can get through.
  • Configuration items:
    • Host IP: Usually 0.0.0.0 (listen on all adapters) or 127.0.0.1.
    • Host port: The port opened on the Windows side.
    • WSL port: The port the service inside the instance listens on.

Global HTTP Proxy ​

Configuring a proxy inside WSL (for example, when git clone or apt install is slow) usually requires editing multiple configuration files.

  • Quick configuration: WSL Dashboard provides a global proxy switch.
  • How it works: Based on your settings, it automatically configures proxy environment variables or proxy options for the relevant services of the selected instance, saving you the trouble of manually finding the host IP.
  • Supported protocols: Common http:// and socks5:// protocols.

Network Status Monitoring ​

In the network panel you can view in real time:

  • WSL host IP: The IP of the Windows virtual network adapter.
  • WSL instance IP: The address actually assigned inside the instance.
  • Active connections: Monitor the currently active port forwarding rules and traffic status.

Advanced Network Mode (Mirrored Mode) ​

For Windows 11 users, WSL 2 supports "mirrored" networking mode.

  • Advantages: Mirrored mode lets WSL instances share the host's network interfaces directly, resolving many complex VPN or LAN discovery issues.
  • Configuration advice: If you have enabled mirrored mode, WSL Dashboard's port forwarding still works, but you may prefer to access services directly via the host IP.

Note

Setting auto_shutdown_distros = true in settings.toml ensures that no useless network listening tasks remain in the background after the Dashboard is closed.

Troubleshooting ​

Port Conflicts ​

If a port forwarding rule doesn't take effect, check:

  1. Whether the host port is occupied: use netstat -ano | findstr :<port> to check.
  2. Administrator privileges: some ports (e.g. ports below 1024) may require administrator privileges to listen on.

Firewall Blocking ​

Although WSL Dashboard attempts to configure rules automatically, if you have a third-party firewall installed (such as Huorong, 360, etc.), you may need to manually allow wsldashboard.exe network access.