Listen to this Post
Understanding common ports is essential for securing and troubleshooting networks. Whether you’re in IT, cybersecurity, or preparing for certifications like CompTIA, CEH, or CCNA, these ports are fundamental.
Top 20 TCP/UDP Ports in Cybersecurity
- FTP (TCP 21) β File Transfer Protocol (unencrypted).
- SSH (TCP 22) β Secure Shell for encrypted remote access.
- Telnet (TCP 23) β Unencrypted remote login (insecure).
- SMTP (TCP 25) β Simple Mail Transfer Protocol for email.
- DNS (TCP/UDP 53) β Domain Name System for IP resolution.
- DHCP (UDP 67/68) β Dynamic Host Configuration Protocol.
- TFTP (UDP 69) β Trivial FTP for lightweight file transfers.
8. HTTP (TCP 80) β Unencrypted web traffic.
- POP3 (TCP 110) β Post Office Protocol for email retrieval.
- NTP (UDP 123) β Network Time Protocol for clock synchronization.
- IMAP (TCP 143) β Internet Message Access Protocol for email.
- SNMP (UDP 161/162) β Simple Network Management Protocol.
- LDAP (TCP 389) β Lightweight Directory Access Protocol.
14. HTTPS (TCP 443) β Encrypted web traffic.
- SMB (TCP 445) β Server Message Block for file sharing.
16. Syslog (UDP 514) β System logging protocol.
17. MySQL (TCP 3306) β Database communication.
- RDP (TCP 3389) β Remote Desktop Protocol for Windows.
- VNC (TCP 5900) β Virtual Network Computing for remote control.
- IRC (TCP 6667) β Internet Relay Chat (rarely used today).
You Should Know:
- Checking Open Ports with Linux (Netstat & Nmap)
</li> </ol> <h1>List active connections (Linux/Windows)</h1> netstat -tuln <h1>Scan for open ports using Nmap</h1> nmap -sS -p 1-1000 target_IP
#### **2. Securing SSH (Port 22)**
Disable root login and change the default port:
sudo nano /etc/ssh/sshd_config
Add:
PermitRootLogin no Port 2222 # Change default SSH port
Restart SSH:
sudo systemctl restart sshd
#### **3. Blocking Unnecessary Ports with Firewall (UFW)**
sudo ufw deny 21/tcp # Block FTP sudo ufw deny 23/tcp # Block Telnet sudo ufw enable
#### **4. Monitoring Suspicious Traffic (TCPDump)**
sudo tcpdump -i eth0 port 80 or port 443 -w traffic.pcap
#### **5. Testing HTTP/HTTPS (Curl & OpenSSL)**
curl -I http://example.com openssl s_client -connect example.com:443
### **What Undercode Say:**
Mastering these ports is crucial for network security. Always:
– Audit open ports regularly (netstat,nmap).
– Harden services (SSH, RDP, FTP).
– Use firewalls (UFW, iptables) to block unwanted traffic.
– Monitor logs (journalctl -u sshd,tcpdump).For penetration testers, knowing these ports helps in enumeration and exploitation. For defenders, itβs about locking down vulnerabilities.
### **Expected Output:**
A well-secured network with only necessary ports open, logged traffic for analysis, and hardened services against attacks.
**Further Reading:**
References:
Reported By: Oche King – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass βJoin Our Cyber World:



