What is the default TCP port for HTTP and HTTPS respectively, and why can these defaults matter in security configurations?
- A.HTTP: 443, HTTPS: 80 - reversed to prevent automated scanners from detecting HTTPS services; keep-alive connections were removed in HTTP/1.1, which opens a fresh TCP connection for every request by default; TLS for HTTPS is negotiated after the first HTTP request is sent in cleartext, letting the server choose a certificate
- B.HTTP: 80, HTTPS: 443 - knowing the defaults matters because firewall rules, WAFs, and browser security policies often apply differently to well-known ports versus custom ports; for example, HSTS applies to port 443 and browsers apply stricter mixed-content rules to port 80
- C.HTTP: 80, HTTPS: 8443 - HTTPS uses a dedicated high port to separate traffic from HTTP
- D.HTTP: 8080, HTTPS: 8443 - the 'safe' ports required for non-privileged web servers
Why B is correct