HTTPfy

Port 8005 (Tomcat shutdown port)

Tomcat listens on 127.0.0.1:8005 for the SHUTDOWN command.

Registered (user) port, 1024-49151 TCP Web Localhost or LAN only

What port 8005 is used for

Tomcat listens on 127.0.0.1:8005 for the SHUTDOWN command.

Security: should port 8005 be open?

Localhost or LAN only. It must stay on localhost (or be disabled with port=-1); anyone who can send the shutdown string can stop Tomcat.

IANA assignment

Service nameProtoDescriptionAssigneeReference
mxi TCP MXI Generation II for z/OS Rob Scott -
mxi UDP MXI Generation II for z/OS Rob Scott -

Registry dates for this port: registered 2007-05.

Check what is listening on port 8005

Linux: is anything listening on TCP 8005?
sudo ss -tlnp 'sport = :8005'
Linux / macOS: which process owns the port
sudo lsof -nP -i :8005
Older Linux / BSD (net-tools)
sudo netstat -tlnp | grep ':8005 '
Windows (Command Prompt)
netstat -ano | findstr :8005
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 8005 -State Listen | Select LocalAddress,OwningProcess

Test it from outside

From another machine
nc -vz -w 5 HOST 8005
From Windows
Test-NetConnection HOST -Port 8005

Block port 8005 in the firewall

ufw
sudo ufw deny 8005/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 8005 -j DROP
nftables
sudo nft add rule inet filter input tcp dport 8005 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'Block TCP 8005' -Direction Inbound -Protocol TCP -LocalPort 8005 -Action Block

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.