Live Network & Web

Port Checker

Test single ports, ranges or common services over TCP from the server, with abuse protection and an API for scripts.

Part of

troubleshooting.tools

Single port on scanme.nmap.org
3
modes: single, range, common
20
common services in the quick scan
0
queues: full means an immediate 503
0
visitor addresses stored

Technologies

PHP TCP nginx Docker Docker-in-Docker GitLab CI/CD HMAC-SHA256 SSRF-Schutz Content Security Policy

The Challenge

“Is this port reachable from outside?” is one of the most common questions when setting up a service. A public port checker is a risk in itself: it must not become a stepping stone into a private network, must not be abused for mass scans, and has to refuse honestly under load instead of failing silently.

The Solution

Every check is a TCP connect from the server with its own time cap. Private and reserved targets are refused, even when only the name resolution leads to them, and the connection goes to exactly the address that was checked. Cost is counted in ports checked, not requests, and truncated scans are clearly marked.

Three check modes

Single port

Host and port with a selectable timeout. Result: resolved address, service name, response time and status open or closed.

Port range

Start and end port. Result: open, closed and total counts, duration and the list of open ports with service and time.

Common services

A fixed set of 20 services, from SSH, SMTP and HTTPS to PostgreSQL, Redis and MongoDB. TCP only; UDP is not checked.

Abuse protection

The SSRF guard checks the resolved address, not just the name, and connects to exactly that address, so a second lookup cannot point to another target. A scan costs a multiple of a single check, so no request does a hundred times the work for the same price. Admission checks the cheap things first: is the address already busy, is there a free slot, is there quota left. When everything is full the answer is an immediate HTTP 503; requests are never queued. If the limiter cannot keep its state, it refuses instead of letting requests through. Outbound connections are guarded and fail closed.

API

GET returns JSON or plain text: “Open” or “Closed” for one port, one line per open port for scans. The plain-text format is meant for shell conditionals. POST offers single port, range, common services and several hosts for one port. A closed port is a normal HTTP 200 answer; errors come as 400, the per-address rate limit as 429 and full capacity as 503.

Platform and operations

The tool runs on the same platform as every tool on troubleshooting.tools: plain PHP behind nginx in one Docker image, a shared layout and router, a strict Content Security Policy per route and no CDN. GitLab CI tests every branch, builds the images with Docker-in-Docker and deploys them; structured logs and external uptime checks monitor operations.

Privacy

The test runs from the server; the target sees the server, not the visitor. For the rate limit only a keyed HMAC-SHA256 of the visitor's address is stored, never the address itself. Checked hosts and ports appear in the server log. Results are not cached, and the page loads nothing from third parties.

Results

A port checker that answers the reachability question quickly without becoming an attack tool itself: guarded targets, fair cost, honest refusal under load and an API that works directly in scripts.

Gallery

Screenshots of the public site with example targets.