Back to blog
4 min read

Network Ports You Need to Know

The ports I reference constantly when configuring firewalls, troubleshooting connectivity, and reviewing security.

NetworkingFundamentals

I look up port numbers constantly. Firewall rules, security group configs, troubleshooting connectivity - you need to know what services use which ports. Here's my reference list.

Web Traffic

PortServiceNotes
80HTTPUnencrypted web. Mostly just for redirects now.
443HTTPSEncrypted web. This should be your default.
8080HTTP-AltCommon for proxies, dev servers
8443HTTPS-AltAlternative HTTPS

Remote Access

PortServiceNotes
22SSHEncrypted remote access. Disable password auth, use keys.
3389RDPWindows Remote Desktop. Never expose directly to internet.
23TelnetPlaintext. Should be disabled everywhere. Legacy only.

RDP exposed to the internet is a common attack vector. I've seen compromised servers where RDP was the entry point. Always put it behind a VPN or jump host.

File Transfer

PortServiceNotes
21FTP (control)Plaintext credentials. Replace with SFTP.
20FTP (data)Active mode data channel
22SFTPSSH-based file transfer. Use this instead of FTP.

Email

PortServiceNotes
25SMTPServer-to-server mail. Often blocked by ISPs.
587SMTP SubmissionFor mail clients sending mail. Use this.
465SMTPSSMTP over TLS
993IMAPSEncrypted IMAP
995POP3SEncrypted POP3
143IMAPUnencrypted. Don't use.
110POP3Unencrypted. Don't use.

DNS and Network Services

PortServiceNotes
53DNSUDP for queries, TCP for zone transfers
67/68DHCPServer listens on 67, client on 68
123NTPTime sync. Important for auth protocols.
514SyslogCentralized logging

Databases

PortServiceNotes
3306MySQL/MariaDBNever expose to internet
5432PostgreSQLNever expose to internet
1433SQL ServerNever expose to internet
27017MongoDBDefinitely never expose to internet
6379RedisIn-memory store. Often misconfigured.

Database ports should only be accessible from application servers. I've seen data breaches from exposed MongoDB instances - attackers scan for these constantly.

Directory Services

PortServiceNotes
389LDAPUnencrypted directory access
636LDAPSLDAP over TLS. Use this.
88KerberosActive Directory authentication

Monitoring

PortServiceNotes
161SNMPNetwork monitoring
162SNMP TrapsAlerts from devices

Security Rules I Follow

Default deny. Block everything, then explicitly allow what's needed.

Encrypted alternatives only. HTTPS not HTTP. SSH not Telnet. SFTP not FTP.

Never expose management ports. SSH, RDP, database ports should only be accessible from known IPs or through VPN.

Audit regularly. Unused open ports are attack surface waiting to be exploited.

Quick Reference

Most common ports I deal with daily:

  • 22 - SSH
  • 80/443 - Web traffic
  • 53 - DNS
  • 3306/5432 - Databases
  • 6379 - Redis

When troubleshooting, I check these first.

Key Takeaways

  • Know your web ports (80, 443), remote access (22, 3389), and databases (3306, 5432)
  • Always use encrypted protocols when available
  • Database and management ports should never face the public internet
  • Default deny in firewall rules - only open what's explicitly needed
BT

Written by Bar Tsveker

Senior CloudOps Engineer specializing in AWS, Terraform, and infrastructure automation.

Thanks for reading! Have questions or feedback?