Cannot access WSL2 python http.server (port 7070) from Windows 11 host via localhost
22:25 06 Jun 2026

I am running a Python HTTP server inside my WSL2 (Ubuntu) instance on Windows 11, but I am unable to access it from my Windows host browser.

Here is what I did inside the WSL2 terminal:


drown@DESKTOP-N9JM9BA:/mnt/c/Windows/system32$ python3 -m http.server 7070
Serving HTTP on 0.0.0.0 port 7070 (http://0.0.0.0:7070/) ...

The Problem: When I try to access the server from my Windows 11 host browser using any of the following URLs, the connection times out and nothing loads:

  • http://localhost:7070/

  • http://127.0.0.1:7070/

  • http://0.0.0.0:7070/

Environment:

  • OS: Windows 11

  • WSL Version: WSL 2

  • WSL Distro: Ubuntu

    Here are my WSL settings
    enter image description here

What I've checked:

  1. The service is listening on 0.0.0.0, which should ideally allow external connections.

  2. WSL2 is running, and there are no error messages in the terminal output.

Why is the Windows 11 host unable to forward localhost requests to the WSL2 VM on this port? Are there any specific Windows Firewall rules or WSL network configurations required to fix this?

Any help would be greatly appreciated!

windows windows-subsystem-for-linux