[Insights](/insights/) / [Engineering Playbooks](/insights/engineering_playbooks/)

# How to proxy port from WSL2 to another device in Wi-Fi network

Since WSL2 is a VM you cant directly access its ports from LAN, but here we will show you how to workaround it

![Ivan Borshchov](https://static.devforth.io/adminusers/avatars/2026/48db9847-d461-40cd-b344-f2bd7b0d98ca-avatar_ivan@devforth.io_f4ce9df9-8363-4314-9345-28753c76a386.jpeg)

Ivan Borshchov

CEO & System Architect @ Devforth

Jan 21, 2025

![How to proxy port from WSL2 to another device in Wi-Fi network](https://static.devforth.io/posts/logo-svg/2026/bfbc8087-b5c0-4e75-9c54-a0d911fc4bfa-logo-preview-new.svg)

![How to proxy port from WSL2 to another device in Wi-Fi network](https://static.devforth.io/posts/logo-svg/2026/bfbc8087-b5c0-4e75-9c54-a0d911fc4bfa-logo-preview-new.svg)

Assume you have a process which listens on TCP 3000 in WSL2

> The process should bind for the host `0.0.0.0`, not `127.0.0.1` and not `localhost`. Most times software has a host configuration like `--host 0.0.0.0` or similar. You can Google "How to set host 0.0.0.0 in Svelte/Vue/React etc".

Run PowerShell From Administrator and type there:

```
New-NetFirewallRule -DisplayName "Allow WSL2 HTTP Server" -Direction Inbound -Protocol TCP -LocalPort 3000 -Action Allow
```

In WSL 2 terminal

```
ip a
```

Search for `inet` near `eth0` to find your WSL2 IP:

![eth0 adapter inet IP](https://static.devforth.io/posts/images/2026/fbbdae7a-9d44-4986-9988-e489e5819553-image_1775045796935.png)

eth0 adapter inet IP

Return to Power Shell and type

```
netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=192.168.217.58
```

Replace `connectaddress` with your WSL 2 IP.

To find out address of your PC, write in Power Shell:

```
ipconfig
```

Search for Wi-FI adapter and IPv4 address:

![WiFI adapter IPv4](https://static.devforth.io/posts/images/2026/0716db2e-dfac-44d6-8e9b-35f5ff0b0e00-image_1775045813337.png)

WiFI adapter IPv4

On your phone connected to same Wi-FI got to `https://192.168.28.246:3000`  (change it with your IP)

[

Back to insights

](/insights)

[](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdevforth.io%2Finsights%2Fhow-to-proxy-port-from-wsl2-to-another-device-in-wi-fi-network)[](https://bsky.app/intent/compose?text=How%20to%20proxy%20port%20from%20WSL2%20to%20another%20device%20in%20Wi-Fi%20network%0A%0Ahttps%3A%2F%2Fdevforth.io%2Finsights%2Fhow-to-proxy-port-from-wsl2-to-another-device-in-wi-fi-network)[](https://x.com/intent/tweet?text=How%20to%20proxy%20port%20from%20WSL2%20to%20another%20device%20in%20Wi-Fi%20network%20by%20%40ivanborshchov%0A%0Ahttps%3A%2F%2Fdevforth.io%2Finsights%2Fhow-to-proxy-port-from-wsl2-to-another-device-in-wi-fi-network)
