Ports / HTTP

TCP port

Port 80: HTTP

TCP port 80 is HTTP, the web without encryption: the default port of every http:// address.

  • Anyone on the path can read and change what is sent to port 80. HTTPS, on port 443, sends the same requests inside TLS.
  • A request line (GET /account), headers and an optional body go one way; a status, headers and a body come back.

Check port 80 on Linux

Put the server's name or address in place of HOST.

ss -tlnp 'sport = :80'
On the server: is a program listening on TCP port 80, on which address, and which program? How to read ss.
nc -zv HOST 80
From a client: does a TCP connection to port 80 open, get refused, or time out? How to read nc.
tcpdump -ni any tcp port 80
On either end: the packets to and from TCP port 80, as they cross the card. How to read tcpdump.
nmap -p 80 HOST
From outside: is TCP port 80 open, closed or filtered? How to read nmap.

What runs on it

HTTP
The web's request and response protocol: plain text over TCP unless wrapped in TLS.
Port
A 16-bit number that picks the program on a device: web 80 and 443, DNS 53, SSH 22.
Virtual host
Many sites on one address and port, told apart by the Host header in each request.

Use port 80 on real machines

Open HTTP: read the requests behind every web page

Sources

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab