Security & Blacklist7 min read

How to Check Open Ports: Audit Server Firewalls, Port Scanning & TCP/UDP

A practical guide to testing open ports on your server, understanding risks associated with exposed services like SSH, RDP, and MySQL, and auditing firewalls.

D
DNSChecker Security Operations
Perimeter Security & Penetration Tester
Published: November 2026
Companion Diagnostic Tool

Run Free Online Port Scanner

Test your domain or IP address in real time with our free online network scanner.

Launch Tool

Every internet server communicates through 65,535 logical TCP and UDP ports. Leaving unnecessary ports exposed to the public internet invites automated botnets, credential brute-forcing, and zero-day exploit probes.

Critical Ports & Associated Security Risks

  • Port 80 / 443 (HTTP / HTTPS): Intended for public web traffic. Always enforce HTTPS.
  • Port 22 (SSH): Remote Linux administration. Must be secured with public key authentication and Fail2ban.
  • Port 3389 (RDP): Windows Remote Desktop. Prime target for ransomware; should always sit behind a corporate VPN.
  • Port 3306 / 5432 (MySQL / Postgres): Databases should bind strictly to 127.0.0.1 or a private VPC subnet.

Frequently Asked Questions

Is it illegal to scan ports on someone else's server?

While port scanning in isolation is generally considered a reconnaissance activity, performing unauthorized aggressive scans against third-party servers can violate terms of service, trigger intrusion detection systems (IDS), and in some jurisdictions be interpreted as intent to breach.

What ports should never be exposed to the public internet?

Database ports (MySQL 3306, PostgreSQL 5432, Redis 6379, MongoDB 27017) and remote desktop ports (RDP 3389, Telnet 23) should NEVER be accessible from the public internet. Use a VPN or SSH tunnel instead.

Share this technical guide: