Port 7: Echo

Port 7 (TCP/UDP) is used by Echo. Returns whatever it receives. Used for testing in the past; normally disabled today.

7Port
TCP/UDPProtocol
echoIANA service name
Legacy protocolsCategory

Port range

7 is a well-known (system) port (range 0–1023). On Linux and macOS, binding to it traditionally needs root or the CAP_NET_BIND_SERVICE capability.

Security

Port 7 should not be reachable from the public internet. Restrict it to trusted networks or a VPN, and scan your public IP to confirm it is closed.

Open port 7 in a firewall

ufw         sudo ufw allow 7/tcp
            sudo ufw allow 7/udp
iptables    sudo iptables -A INPUT -p tcp --dport 7 -j ACCEPT
            sudo iptables -A INPUT -p udp --dport 7 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=7/tcp
            sudo firewall-cmd --permanent --add-port=7/udp
Windows     New-NetFirewallRule -DisplayName "Echo 7" -Direction Inbound -Protocol TCP -LocalPort 7 -Action Allow

Check if port 7 is open

nc -vz example.com 7
Test-NetConnection example.com -Port 7   # PowerShell
sudo ss -tulpn | grep ':7 '   # what is listening locally (Linux)

Other legacy protocols ports

Frequently asked questions

What is port 7 used for?
Echo. Returns whatever it receives. Used for testing in the past; normally disabled today.
Is port 7 TCP or UDP?
Both are assigned. Check which one your software actually listens on.