Protocols and ports
An IP address gets you to the device, but the device runs many services. A port is the door number inside it. Like a building: the IP is the building number and the port is the flat.
| Port | Protocol | Used for |
|---|---|---|
| 443 | HTTPS | Encrypted websites. Today's most important port. |
| 80 | HTTP | Unencrypted websites. |
| 53 | DNS | Turning names into addresses. |
| 22 | SSH | Secure remote server administration. |
| 25 / 587 | SMTP | Sending email. |
| 3389 | RDP | Windows remote desktop. |
| 3306 | MySQL | The MySQL database from the SQL course. |
| 67 / 68 | DHCP | Handing out addresses. |
Some old protocols send everything in plain text, so anyone listening on the network can read passwords. Each has an encrypted replacement:
| Insecure | Secure replacement | Why |
|---|---|---|
| HTTP · 80 | HTTPS · 443 | TLS encrypts the page and login details. |
| Telnet · 23 | SSH · 22 | Telnet sends the password in plain text. |
| FTP · 21 | SFTP · 22 | Encrypted file transfer. |
Watch outGolden firewall rule: open only what you need. Nakhla's ERP server needs 443 for users and never needs 3306 open to the internet: the database should only be reachable by the app from inside the network.