Skip to content

Port, Service and Firewall Allow-List Lookup

Honest note: a browser cannot probe remote ports and will not change your firewall. What this page does is tell you which service owns a port, generate a correct allow rule, and hand you the commands that verify it. You run and verify the rules yourself.

1. Find out which service owns a port

Type a port number or a service name to filter. The ports below are each service's default; your own configuration is what counts.

2. Generate the allow rule

Enter the ports, the source range and the firewall flavour; the tool emits the rule, the reload command and the persistence note.

3. "The port is open but still unreachable" — work outward

A rule taking effect is not the same as traffic passing. Verify from the inside out:

Layer Command What it means
Process ss -tlnp \| grep :443 nothing listening means a service problem, not a firewall one
Local nc -vz 127.0.0.1 443 fails locally if the service binds only to 127.0.0.1 or only to IPv6
Rules iptables -S INPUT check the allow rule sits before any DROP
Remote nc -vz <ip> 443 refused means the port is closed; timeout means packets are dropped
Capture tcpdump -n -i any port 443 shows whether the SYN arrives and whether a SYN-ACK leaves

Three traps worth memorising:

Rule order. iptables -A appends. If a DROP already sits above it in the chain, the allow is never reached. Use -I to insert at the top, or -I INPUT 2 for a specific position, then read iptables -S INPUT to confirm the order.

Two firewalls in a row. Cloud hosts (Alibaba Cloud, Tencent Cloud, AWS) put a security group in front of the host firewall. If the security group does not allow the port, nothing you do on the host matters; conversely a closed host firewall blocks traffic the security group allowed. Check both layers.

firewalld overwrites hand-made rules. On a host running firewalld, rules inserted with iptables -I are removed on the next firewall-cmd --reload. Use firewall-cmd exclusively there.

4. Ports that should never face the internet

Exposed management and data ports are the most common way into a compromised host:

  • Databases: 3306 MySQL, 5432 PostgreSQL, 27017 MongoDB, 6379 Redis, 11211 memcached — internal application subnets only.
  • Coordination and config: 2379/2380 etcd, 2181 ZooKeeper, 8500 Consul — exposure leaks cluster state and credentials.
  • Dashboards: 8086 InfluxDB, 9200 Elasticsearch, 15672 RabbitMQ, 5601 Kibana — reachable via a bastion or an authenticated reverse proxy.
  • Containers and orchestration: 6443 kube-apiserver, 10250 kubelet, 2375/2376 Docker API — 2375 is unauthenticated plaintext and must be off entirely.

Publicly, keep 80/443 and perhaps 22 restricted to known source IPs. Everything else belongs on the internal network or behind a VPN.