Port 8000 · HTTP alternate (dev)

All network ports
Web & proxies · Registered8000/tcp

Port / TCP

8000HTTP alternate (dev)

A common unprivileged HTTP port: Python's http.server, Django's runserver, and countless application servers default here.

If it is internet-facing: Port 8000 is legitimate in the right place, but exposed carelessly it widens the attack surface noticeably.

Exposure

Localhost only

Transport

Cleartext

Risk if public

Elevated

Exposure verdict

ReachLocalhost only

Port 8000 should be bound to 127.0.0.1. Nothing outside the host needs to reach it, and binding to 0.0.0.0 is the single change that turns it into an incident.

TransportCleartext

Traffic crosses the network readable and modifiable. Anything sensitive on this port needs a tunnel, a VPN, or a different protocol.

RangeRegistered (1024–49151)

Registered with IANA on request, but bindable by any unprivileged user. Registration records intent — it does not reserve the port, so collisions between products are common.

FamilyWeb & proxies

Grouped with the other web & proxies ports so a rule written for one can be checked against its neighbours.

What actually goes wrong

2 notes
  • 'python -m http.server' serves the working directory with no authentication — including any secrets in it.
  • Bind explicitly to 127.0.0.1; the default of all interfaces publishes the directory to the whole network.

Recommended firewall rule

Deny at the edge and bind to loopback

A firewall rule is the second line here. Fix the bind address in the service configuration so the listener never leaves the host.

ufw

sudo ufw deny 8000/tcp

iptables

sudo iptables -A INPUT -p tcp --dport 8000 -j DROP

If you do need it open to everyone

sudo ufw allow 8000/tcp

Write down why. An unexplained allow rule outlives the person who added it, and the next reviewer has no way to tell a deliberate exception from an accident.

Check what is really there

Listening locally

sudo ss -tlpn 'sport = :8000'

The bind address is the answer that matters: 127.0.0.1 is local-only, 0.0.0.0 and :: mean every interface.

Listening (macOS)

sudo lsof -nP -iTCP:8000 -sTCP:LISTEN

macOS ships lsof rather than ss; this names the owning process and user.

From outside

nmap -sV -Pn -p 8000 <host>

A version probe confirms whether HTTP alternate (dev) is actually what answers, rather than trusting the number. Only scan hosts you are authorised to test.

Reachability

nc -vz <host> 8000

The quick yes/no when you only need to know whether a path exists through the firewall.

Nearby and related ports

8
ProtocolTCP
Rangeregistered
Transportcleartext
Exposureloopback