HackMyIP

我的連接埠開放了嗎?

免費連接埠檢測器 · 真實的伺服器端 TCP 掃描

要檢查某個連接埠是否開放,請在下方輸入主機或 IP(留空則檢測你自己的公開 IP)。HackMyIP 會從伺服器端真實發起 TCP 連線:開放表示有服務在監聽,關閉表示連線被拒絕,過濾通常表示防火牆靜默丟棄了封包。
準備掃描
以JSON取得此結果 → GET /api/ports?host=1.1.1.1&ports=80,443  ·  API文件
關於連接埠掃描

This is a real server-side TCP scan: HackMyIP opens a TCP connection to each port from Cloudflare's network and reports the actual result. Open means the TCP handshake completed (a service is listening). Closed means the connection was actively refused or reset. Filtered means no response within 2.5 seconds, typically a firewall silently dropping packets. Blocked means Cloudflare blocks outbound connections to that port (port 25/SMTP). Leave the field blank to scan your own public IP, or enter any public host or IP you are authorized to test. Only scan networks you own or have permission to test.

常見連接埠速查表
連接埠服務用途
22SSHEncrypted remote terminal access
80HTTPUnencrypted web traffic
443HTTPSEncrypted web traffic
21FTPFile transfer
25SMTPOutgoing email (often blocked by ISPs)
53DNSDomain name resolution
3389RDPWindows Remote Desktop
3306MySQLDatabase server
8080HTTP-altProxies and development servers
如何自行檢查連接埠是否開放

Windows (PowerShell)

  1. Test a remote port: Test-NetConnection -ComputerName example.com -Port 443TcpTestSucceeded : True means the port is open.
  2. List ports your PC is listening on: netstat -ano.

macOS / Linux

  1. Test a remote port with netcat: nc -zv example.com 443 — "succeeded" means open.
  2. Or use nmap: nmap -p 443 example.com.
  3. List local listening ports: ss -tuln (Linux) or lsof -i -P | grep LISTEN (macOS).

Any OS (quick check)

  1. Run telnet example.com 443. A blank screen or connection message means the port is open; an immediate error means it is closed or filtered.
最後更新:

常見問題

什麼是開放連接埠?

Open ports are network endpoints that accept incoming connections. Each port is associated with a specific service (e.g., port 80 for HTTP, port 443 for HTTPS, port 22 for SSH). Open ports allow legitimate traffic but can also be entry points for attackers if the services behind them have vulnerabilities or are misconfigured. Firewalls control which ports are accessible.

Is port scanning legal?

Port scanning your own network and systems is legal. Scanning networks you own or have explicit permission to test is standard practice in security assessments. However, scanning third-party systems without authorization may violate computer crime laws in many jurisdictions. Always ensure you have proper authorization before scanning any network that is not your own.

How do I close open ports?

To close open ports: configure your firewall to block unwanted incoming connections, stop unnecessary services running on those ports, use your router's built-in firewall settings to restrict access, and disable port forwarding rules you no longer need. On Windows, use Windows Firewall; on Linux, use iptables or ufw; on macOS, use the built-in firewall in System Preferences.