Skip to content
statance
MenuClose
← All ports

Port 8000: HTTP alternate / development servers

Medium risk

Port 8000 is a common development and alternate HTTP port. Django’s runserver and Python’s built-in http.server default to it, as does Splunk’s web interface. It should not be reachable from the public internet.

Port
8000
Protocol
TCP
Service
HTTP alternate / development servers
Expose to internet?
No
Also used by
Django runserver, python -m http.server, Splunk Web, uvicorn/FastAPI, Laravel artisan serve

Is port 8000 safe to open?

python3 -m http.server listens on all interfaces by default and serves the current directory, so starting it in the wrong folder can publish source code or keys. Django’s runserver is explicitly not for production. If Splunk is on 8000, it is a login page to your logs.

How to secure HTTP alternate / development servers

  • Bind development servers to localhost (python3 -m http.server --bind 127.0.0.1, manage.py runserver 127.0.0.1:8000).
  • Run production apps under gunicorn or uvicorn behind nginx or Caddy with TLS.
  • Restrict Splunk Web to admin networks and enable TLS.

Check if port 8000 is open

Linux: what is listening on this port

sudo ss -tlpn | grep ':8000 '

Windows (PowerShell): what is listening

Get-NetTCPConnection -LocalPort 8000 -State Listen | Select-Object LocalAddress, OwningProcess, @{n='Process';e={(Get-Process -Id $_.OwningProcess).Name}}

From another machine: is it reachable

nc -zv HOST 8000 # or nmap -p 8000 HOST # Windows Test-NetConnection HOST -Port 8000

Test the HTTP alternate / development servers service itself

curl -sI http://HOST:8000/

Restrict port 8000 in the firewall

Replace 10.0.0.0/8 with the network or address that needs access. Docker publishes container ports through its own iptables rules, which bypass ufw; bind published ports to 127.0.0.1 (-p 127.0.0.1:8000:8000) instead of relying on the host firewall.

ufw: allow only your private network, deny everyone else

sudo ufw allow from 10.0.0.0/8 to any port 8000 proto tcp sudo ufw deny 8000/tcp

firewalld: allow one source network only

sudo firewall-cmd --permanent --remove-port=8000/tcp sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/8" port port="8000" protocol="tcp" accept' sudo firewall-cmd --reload

iptables

sudo iptables -A INPUT -p tcp --dport 8000 -s 10.0.0.0/8 -j ACCEPT sudo iptables -A INPUT -p tcp --dport 8000 -j DROP

Windows Firewall (PowerShell, as Administrator)

New-NetFirewallRule -DisplayName "Block 8000 from internet" -Direction Inbound -Protocol TCP -LocalPort 8000 -RemoteAddress Internet -Action Block

Monitor port 8000

Run a TCP port monitor against your public IP on port 8000: here, a failed connection is the healthy result, so you know the firewall is still doing its job. On Linux, the Statance agent also reports every listening port on the server. TCP port monitoring.

Related ports

Port 8080HTTP alternateMedium risk
Port 3000Grafana / Node.js development serversMedium risk
Port 5000Flask / Docker Registry / AirPlayMedium risk

FAQ

What is port 8000 used for?

Port 8000 is a common development and alternate HTTP port. Django’s runserver and Python’s built-in http.server default to it, as does Splunk’s web interface. It is also used by Django runserver, python -m http.server, Splunk Web, uvicorn/FastAPI, Laravel artisan serve.

Is it safe to open port 8000?

Not to the public internet. python3 -m http.server listens on all interfaces by default and serves the current directory, so starting it in the wrong folder can publish source code or keys. Django’s runserver is explicitly not for production. If Splunk is on 8000, it is a login page to your logs.

Is port 8000 TCP or UDP?

HTTP alternate / development servers uses TCP on port 8000.

How do I check if port 8000 is open?

On the server, run sudo ss -tulpn | grep ':8000 ' (Linux) or Get-NetTCPConnection -LocalPort 8000 (Windows) to see what is listening. From another machine, run nc -zv HOST 8000 or Test-NetConnection HOST -Port 8000.

All ports →

Know the moment a port stops answering.

TCP, HTTP, DNS and SSL checks from six regions, plus server metrics from a one-line agent.