DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

How to Access WSL2 Web Apps from a Phone or Other LAN Device

Use your Windows PC’s LAN IP—not localhost on the phone—to open a WSL2 web app. Set up mirrored networking or forward a port from Windows NAT.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To open a web app running in WSL2 from a phone, use the Windows PC’s local network IP address and the app’s port—not localhost. A phone’s localhost points back to the phone itself. For WSL2, choose either mirrored networking on supported Windows 11 systems or a Windows port-forward in the default NAT mode; in both cases, the app and firewall must allow the connection.

Choose a connection method

WSL2 uses NAT by default, and an app running inside it is not directly reachable from other devices on the LAN by default. You can forward a Windows port to the WSL virtual machine, or use mirrored networking for direct LAN access. Microsoft documents mirrored networking for Windows 11 version 22H2 and later.

As an Amazon Associate I earn from qualifying purchases.

Method Requirements Address to open on the phone Trade-off
Mirrored networking Windows 11 22H2 or later, WSL support, and an inbound Hyper-V firewall rule for the app’s port Windows PC’s LAN IP and the app’s port Direct LAN access without a NAT port-forward; availability and networking exceptions apply.
NAT with portproxy Default WSL2 NAT, current WSL VM IP, Windows portproxy listener, and firewall allowance Windows PC’s LAN IP and the forwarded host port Keeps NAT, but the forwarding target may need updating if WSL’s IP changes.

For setup details and compatibility notes, see Microsoft’s WSL networking guide. If your Windows version supports mirrored mode and you prefer fewer forwarding steps, start there. Keep NAT and use portproxy if mirrored mode is unavailable or you intentionally retain NAT.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before configuring networking

Find the Windows PC’s LAN address

On Windows, find the PC’s IPv4 address on the same network as the phone, for example in Windows Settings under Network & internet, or by running ipconfig in a terminal and checking the active adapter’s IPv4 address. Use that address in the phone’s browser, followed by the port, such as http://192.168.1.20:4000. The example IP is illustrative; use the address assigned to your PC.

#1 Best Overall
Sale
TP-Link Smart WiFi 6 Dual Band Router 4 Gigabit LAN Ports | 802.11AX Router, Beamforming, OFDMA, MU-MIMO, Parental Controls, Dual-Core 900MHz Processor, Works with Alexa (Archer AX10)
  • OneMesh Compatible Router - Form a seamless WiFi when work with TP-Link OneMesh WiFi Extenders
  • Next-Gen Wi-Fi 6 Technology – The Archer AX10 leverages advanced Wi-Fi 6 features like OFDMA and 1024-QAM to deliver improved efficiency across your entire network. Perfect for high-bandwidth activities like streaming, gaming, and smart home connectivity.
  • Next-gen Dual Band router - 300 Mbps on 2. 4 GHz (802. 11n) plus 1201 Mbps on 5 GHz (802. 11ax)
  • Connect more devices than ever before - Wi-Fi 6 technology simultaneously communicates more data to more devices using OFDMA and MU-MIMO while reducing lag dramatically
  • Powerful Dual-Core 900MHz Processor – Handles multiple data streams simultaneously for reliable performance across your devices. Ensures smooth streaming, online gaming, and video conferencing without buffering or lag.

Make the app listen beyond loopback

A service bound only to 127.0.0.1 may accept connections only through its own loopback interface. For LAN access, configure the development server to listen on a reachable interface; Microsoft’s networking guide uses 0.0.0.0 as an example. The exact setting depends on your framework. For Flask, for example, Microsoft shows app.run(host='0.0.0.0').

Binding to 0.0.0.0 is an exposure decision: it can make the service accept connections from the LAN. Do not assume a development server has authentication or production-grade security.

Rank #2
Sale
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5) | Dual Band Wireless Internet, Gigabit, Easy Mesh, Works with Alexa - A Certified for Humans Device
  • DUAL-BAND WIFI 6 ROUTER: Wi-Fi 6(802.11ax) technology achieves faster speeds, greater capacity and reduced network congestion compared to the previous gen. All WiFi routers require a separate modem. Dual-Band WiFi routers do not support the 6 GHz band.
  • AX1800: Enjoy smoother and more stable streaming, gaming, downloading with 1.8 Gbps total bandwidth (up to 1200 Mbps on 5 GHz and up to 574 Mbps on 2.4 GHz). Performance varies by conditions, distance to devices, and obstacles such as walls.
  • CONNECT MORE DEVICES: Wi-Fi 6 technology communicates more data to more devices simultaneously using revolutionary OFDMA technology
  • EXTENSIVE COVERAGE: Achieve the strong, reliable WiFi coverage with Archer AX1800 as it focuses signal strength to your devices far away using Beamforming technology, 4 high-gain antennas and an advanced front-end module (FEM) chipset
  • OUR CYBERSECURITY COMMITMENT: TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.

Option 1: Use mirrored networking

Mirrored networking is documented for Windows 11 version 22H2 and later. It gives WSL direct LAN access and changes how Windows and WSL networking interact. Microsoft describes the mode and its limits in the networking guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Enable the mode. Add the following to %UserProfile%.wslconfig, or configure the networking mode in WSL Settings:
    [wsl2]
    networkingMode=mirrored
  2. Apply the global configuration. If you changed .wslconfig, run wsl --shutdown from PowerShell or Command Prompt, then start your distribution again. See Microsoft’s WSL configuration guide for global settings.
  3. Allow the app’s TCP port through the Hyper-V firewall. In an administrator PowerShell window, create a rule for the port your app uses, replacing 4000 if necessary:
    New-NetFirewallHyperVRule -Name "MyWebApp" -DisplayName "My Web App" -Direction Inbound -VMCreatorId '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -Protocol TCP -LocalPorts 4000
  4. Open the app from the phone. Confirm the app is running and listening on its configured port, then visit http://<Windows-PC-LAN-IP>:4000. Use HTTPS only if the app is configured for TLS.

Mirrored-mode localhost behavior is distinct from LAN access: Microsoft documents IPv4 loopback 127.0.0.1 for Windows-to-WSL localhost connections in this mode; IPv6 loopback ::1 is not supported for that connection. Mirrored networking also has documented protocol and port exceptions. If the app is containerized, Microsoft’s WSL troubleshooting guide notes a Docker Desktop published-port issue under mirrored networking in the default namespace.

Rank #3
Sale
TP-Link Dual-Band AX3000 Wi-Fi 6 Wireless Gigabit Internet Router for Home | EasyMesh, VPN Clients & Server, HomeShield, OFDMA, MU-MIMO, USB 3.0, Secure by Design - Archer AX55
  • Next-Gen Gigabit Wi-Fi 6 Speeds: 2402 Mbps on 5 GHz and 574 Mbps on 2.4 GHz bands ensure smoother streaming and faster downloads; support VPN server and VPN client¹
  • A More Responsive Experience: Enjoy smooth gaming, video streaming, and live feeds simultaneously. OFDMA makes your Wi-Fi stronger by allowing multiple clients to share one band at the same time, cutting latency and jitter.²
  • Expanded Wi-Fi Coverage: 4 high-gain external antennas and Beamforming technology combine to extend strong, reliable, Wi-Fi throughout your home.
  • Improved Battery Life: Target Wake Time helps your devices to communicate efficiently while consuming less power.
  • Improved Cooling Design: No heat ups, no throttles. A larger heat sink and redefined case design cools the WiFi 6 system and enables your network to stay at top speeds in more versatile environments.

Option 2: Keep NAT and forward a port

With NAT, Windows can listen on a host port and forward traffic to the WSL VM’s current IP. Run the following in an elevated PowerShell prompt, changing 4000 if your app uses a different port:

$wslIp = (wsl.exe hostname -I).Trim().Split(' ')[0]
netsh interface portproxy add v4tov4 listenport=4000 listenaddress=0.0.0.0 connectport=4000 connectaddress=$wslIp

The uppercase -I in wsl.exe hostname -I returns the WSL address to use as the forwarding target; do not substitute lowercase -i. The equivalent portproxy template is:

Rank #4
NETGEAR Nighthawk WiFi 6 Router R6700AX, Up to 1,500 sq ft, 1.8 Gbps | Reliable Performance, Easy Set Up, 20 devices, 4× Gigabit Port, Dual Band, AX1800
  • NIGHTHAWK WIFI 6 ROUTER FOR YOUR WHOLE HOME: Delivers fast, reliable WiFi across every room of your apartment or small home for streaming, gaming, video calls, and smart home devices, all running at the same time without slowing each other down.
  • WORKS WITH YOUR EXISTING INTERNET SERVICE: Pairs with your existing modem or gateway via ethernet. Compatible with most cable, fiber, DSL, and satellite providers. Some gateways and modem router combos may require bridge mode. No coax needed.
  • SET UP AND MANAGE YOUR NETWORK WITH THE NIGHTHAWK APP: Download the free Nighthawk app on iOS or Android for guided setup. Manage WiFi, run speed tests, pause devices, and set up guest networks from anywhere. Active internet required.
  • READY FOR THE DEVICES YOU ALREADY OWN: Your phones, laptops, and TVs work right out of the box. WiFi 6 delivers speeds up to 1.8 Gbps across 2.4 GHz and 5 GHz bands. Backward compatible with WiFi 5 and earlier.
  • COVERAGE IN EVERY ROOM: Covers up to 1,500 sq. ft. for up to 20 connected devices. Walls, floors, and interference can reduce range. Larger or multi-story homes may benefit from a NETGEAR Orbi mesh WiFi system.
netsh interface portproxy add v4tov4 listenport=<host-port> listenaddress=0.0.0.0 connectport=<wsl-port> connectaddress=<WSL-VM-IP>

listenaddress=0.0.0.0 makes the Windows listener accept requests on all IPv4 addresses, not only the LAN interface. Microsoft notes that this includes incoming requests from any IP address. Use an appropriately scoped Windows Firewall rule and only enable this listener on a network you trust.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make sure the app is listening on the WSL port you specify, then open http://<Windows-PC-LAN-IP>:<host-port> from the phone. If the WSL virtual network address changes, update the forwarding target. Avoid adding router port forwarding when the intended access is limited to devices on the local network.

Best Value
Sale
TP-Link AX5400 WiFi 6 Router (Archer AX73) | Dual Band Gigabit Wireless Internet Router for Streaming, Long Range Coverage
  • 𝐆𝐢𝐠𝐚𝐛𝐢𝐭 𝐖𝐢𝐅𝐢 𝐟𝐨𝐫 𝟖𝐊 𝐒𝐭𝐫𝐞𝐚𝐦𝐢𝐧𝐠 – Up to 5400 Mbps WiFi for faster browsing, streaming, gaming and downloading, all at the same time. Performance varies by conditions, distance to devices, & obstacles such as walls.
  • 𝐅𝐮𝐥𝐥 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐝 𝐖𝐢𝐅𝐢 𝟔 𝐑𝐨𝐮𝐭𝐞𝐫 – Equipped with 4T4R and HE160 technologies on the 5 GHz band to enable max 4.8 Gbps ultra-fast connections.Power:12 V 2.5 A
  • 𝐂𝐨𝐧𝐧𝐞𝐜𝐭 𝐌𝐨𝐫𝐞 𝐃𝐞𝐯𝐢𝐜𝐞𝐬 – Supports MU-MIMO and OFDMA to reduce congestion and 4X the average throughput
  • 𝐄𝐱𝐭𝐞𝐧𝐬𝐢𝐯𝐞 𝐂𝐨𝐯𝐞𝐫𝐚𝐠𝐞 - Covers up to 2,000 sq. ft. High-Power FEM, 6× Antennas, Beamforming, and 4T4R structures combine to adapt WiFi coverage to perfectly fit your home and concentrate signal strength towards your devices.
  • 𝐌𝐨𝐫𝐞 𝐕𝐞𝐧𝐭𝐬, 𝐋𝐞𝐬𝐬 𝐇𝐞𝐚𝐭 – Improved vented areas help unleash the full power of the router
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check the connection if the page will not load

  • Confirm the URL. Use the Windows PC’s LAN IP, not localhost or the WSL IP, from the separate mobile device. Include the host port in NAT mode.
  • Check the app’s bind address and port. The app must be running and listening on a reachable interface at the port you opened.
  • Check both firewall layers where applicable. Windows Firewall may block the host listener; mirrored mode also uses the Hyper-V firewall for inbound traffic to WSL. Permit only the required TCP port.
  • Verify the selected networking mode and forwarding target. NAT portproxy must target the current WSL IP. Mirrored mode requires a supported Windows build and the setting to have been applied.
  • Check the local network. Confirm the phone and PC are on the same network and that its policy allows devices to communicate. Guest Wi-Fi and some office networks isolate clients.
  • Account for containers and special traffic. Mirrored networking has documented exceptions, and Docker Desktop published ports in the default namespace have a noted issue; consult Microsoft’s troubleshooting guidance if either applies.

Keep the development server limited to your LAN

A LAN-reachable service is not automatically exposed to the public internet, but router settings and network policy can change that boundary. Keep the listener limited to the needed port, avoid broad inbound firewall allowances, stop the server or remove the forwarding when finished, and do not configure router port forwarding for a phone-only LAN use case. Microsoft’s WSL networking guidance cautions that allowing remote connections also allows connections from the LAN.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.