Skip to content

How to Check Which Ports Are Open on a Host

TL;DR:

To check open ports: Enterno.io port-checker — enter host and port, get status (open/closed/filtered) in 1-2 seconds. For a full scan (top-100 ports) use the Port Scanner.

Check your host & ports →

Step-by-step guide

  1. Open the port checker. Go to enterno.io/en/ping.
  2. Enter host and port. Example: example.com + 443. IPv4, IPv6, hostname — all supported.
  3. Run the check. Result: open (port listening), closed (connection refused), filtered (firewall blocking).
  4. For a full scan — Port Scanner. At /en/port-scanner you can check the top-100 ports + a custom list in one pass.
  5. Locally: nmap / nc. From the command line: nc -zv hostname 443 or nmap -p 22,80,443 hostname. Online checker is simpler and checks from varied IPs.

Open tool →

Understanding Open Ports and Their Importance

Open ports on a server are essential gateways for communication between different systems. Each port corresponds to a specific service or application running on a server, allowing data to flow in and out. Understanding open ports is crucial for network security, as they can be potential entry points for unauthorized access.

Every service that runs on a server listens on a specific port. For example:

  • HTTP: Port 80
  • HTTPS: Port 443
  • SSH: Port 22
  • FTP: Port 21

When a port is open, it means that the service is actively listening for connections. Conversely, closed ports indicate that no service is available at that port, while filtered ports may be blocked by a firewall, preventing access to the service.

Monitoring open ports is vital for identifying vulnerabilities in your server. Attackers often scan for open ports to exploit weaknesses in services running on those ports. Regularly checking for open ports allows you to maintain a secure environment by ensuring only necessary services are exposed to the internet.

Using Nmap for Comprehensive Port Scanning

Nmap (Network Mapper) is a powerful tool widely used for network discovery and security auditing. It can be employed to find open ports on a server and provides detailed information about the services running on those ports.

To perform a basic scan using Nmap, you can use the following command:

nmap [target-host]

This command will scan the target host for the most common 1,000 ports. To scan all 65,535 ports, use:

nmap -p- [target-host]

For a more detailed output that includes service version detection, use:

nmap -sV [target-host]

Additionally, if you want to scan for specific ports, you can specify them like this:

nmap -p 22,80,443 [target-host]

These commands provide a clear view of which ports are open and what services are running, enabling you to assess your server's security posture effectively.

Automating Port Scans with Scripts

For continuous monitoring of open ports on your server, automating port scans through scripting can save time and enhance security. Below is a simple bash script that utilizes Nmap to check for open ports and logs the results.

First, create a new script file:

touch port_scan.sh

Then, open the file in a text editor and add the following code:

#!/bin/bash
HOST=[target-host]
LOGFILE=port_scan_results.txt

echo "Scanning $HOST for open ports..."
nmap -p- $HOST > $LOGFILE
echo "Scan complete. Results saved to $LOGFILE"

Make sure to replace [target-host] with the actual IP address or hostname of your server. After saving the script, make it executable:

chmod +x port_scan.sh

Now, you can run the script:

./port_scan.sh

This will perform a full port scan and save the results to port_scan_results.txt. You can schedule this script using cron jobs for regular checks, enhancing your server's security by ensuring that any newly opened ports are promptly identified and assessed.

ICMP PingHost availability and latency
Port ScannerOpen TCP port detection
LatencyResponse time in milliseconds
Packet LossPercentage of dropped packets

Why teams trust us

ICMP+TCP
check protocols
14
key ports scanned
<2s
result
3
regions

How it works

1

Enter IP or domain

2

ICMP packets sent

3

Latency & packet loss shown

How Do Ping and Port Scanning Work?

Ping sends ICMP packets to a host and measures response time. Port scanning checks which TCP ports are open and accepting connections — helping diagnose serviceavailability issues.

Configurable Ping

Choose packet count (3, 4, 6, 10). Stats: min/avg/max latency and packet loss.

Common Port Scanner

Check 14 key ports: HTTP, HTTPS, SSH, FTP, SMTP, MySQL, PostgreSQL, and more.

Cloud-Based Check

Testing from our server — see site availability from outside, not just your local network.

Uptime Monitoring

Need constant monitoring? Create a monitor — checks every minute with notifications.

Who uses this

DevOps

availability diagnosis

Network engineers

TCP port scanning

Developers

connection debugging

SRE

basic health check

Common Mistakes

ICMP blocked = server is downMany servers block ICMP. Ping fails but site works — check ports instead.
High ping = server problemLatency depends on geography. 150ms between continents is normal, not an error.
Closed ports — cause for alarmClosed ports of unused services are good. Unnecessary open ports are a risk.
One check = sufficientNetworks are unstable. A single timeout ≠ a problem. Check multiple times or set up monitoring.

Best Practices

Combine ping and port checksPing shows host availability, ports show specific service availability. Use both.
Check from different locationsThe problem may be local. A cloud test shows the real picture.
Close unused portsEvery open port is a potential attack vector. Keep only necessary ports open.
Set up monitoringManual checks do not scale. Set up automated monitoring with notifications.

Get more with a free account

Ping check history, host availability monitoring and downtime alerts.

Sign up free

Learn more

Frequently Asked Questions

Is signup required?

For a quick check (1-2 requests/min) — no. For continuous monitoring — free account. No credit card.

Is this free?

Yes. Enterno.io Scout is a forever-free plan with 5 monitors. All basic tools without signup.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.