Before exposing a home machine to the internet, verify that outside requests can reach it. A local scan can report every port open even when external clients cannot connect.
The historical run below separates local listeners, LAN hairpinning and public inbound access. Each measures a different path. Verify public reachability using outside requests and target-side evidence together.
What local and outside probes measure
Running a port scan on the machine at home, or nc -zv against yourself from the same Mac, tells you something entirely different from what a visitor on the internet sees.
A TUN proxy can capture selected routes and accept local TCP before upstream completion, depending on its rules and stack. Add an application handshake, target log or packet trace to establish which service actually responded.
A LAN connection to the public address tests hairpin behaviour, whose support depends on router and configuration. Keep either result separate from a genuinely external inbound test.
Probe from an independent external network and compare target listeners, logs and captures. One cloud host is a starting point; use another source for unexplained path differences:
ssh cloud-host "nc -zv -w 5 $HOME_IP $PORT"
Design positive and negative controls
Probing from outside is still not sufficient. The remote command can fail for unrelated reasons — packet loss in between, a cloud provider’s egress policy, a typo, a network problem on the probing host. “Cannot connect” then gets misread as “the port is blocked.”
Use a verified responding listener as a positive control and a verified unbound endpoint as a negative control. Port numbers do not establish state: 22 may run SSH and a high port may be occupied.
for p in 22 443 8443 9999; do
ssh cloud-host "nc -zv -w 5 $HOME_IP $p" 2>&1 | tail -1
done
A successful negative control calls for checks of proxies, occupancy and forwarding. A failed one does not prove ISP filtering. Record success, RST, ICMP and timeout, alongside target-side captures.
This rule fired twice during this run, and caught a wrong conclusion both times.
Step one: inspect upstream NAT and address ownership
CGNAT usually restricts unsolicited IPv4 inbound access. Provider mappings, public addressing, IPv6 or relays may provide alternatives; test the available path.
100.64.0.0/10 is RFC 6598 shared space and can indicate upstream NAT. CGNAT can use other addresses too. Compare router WAN addressing with an external observation made without the proxy, then verify end-to-end service access.
The record reports a public egress IPv4 and roughly 155 ms cloud-host ping. This establishes an ICMP reply from that address, not by itself the absence of CGNAT or working application inbound/DDNS.
One wrinkle in finding your own public IP: the usual echo services outright failed on this line, while others worked. Probe scripts need several sources with fallback rather than one — when your single source is down you will blame your own network.
Step two: test ports individually, and separate “filtered” from “not listening”
Ports 80 and 443 did not connect in the record. Without mapping details, target captures or provider confirmation, the filtering location remains unresolved; this does not establish an ISP block.
A successful 22 test and failed 80 test have different outcomes; each port can have different listeners, mappings and rules. Inspect target SYN arrival, RST and return traffic to localise the fault.
The record also reports success on an “idle” high port, contradicting the expected absent listener. Identify that responder first. Retain the 80/443 timeouts and other successes as observations.
The probe also found 8443 already occupied by a two-factor gateway. That is the kind of fact only measurement produces; memory and documentation both get it wrong.
Identify the 80/443 failure and 8443 service before choosing an available mapped port or another publication path. The old observations do not establish permanent unavailability.
The port choice constrains certificates and CDN
This step gets skipped a lot: once the port is chosen, two other things are constrained by it.
HTTP-01 validates through port 80; TLS-ALPN-01 uses 443. If those paths are unavailable, DNS-01 or a reachable edge/other server can perform supported validation. Certificate names are not tied to the final service port.
Check CDN client-facing ports, origin-port overrides and tunnels separately. An unsupported default port may be mapped to a supported entry; direct DNS is one option rather than a requirement.
And staying direct means giving up origin-IP concealment, edge caching, and DDoS mitigation. That is a genuine trade-off, not a configuration detail.
Hairpin NAT and the scope of LAN tests
The following example traces the hairpin NAT path when a LAN client connects to its own public IP.
Suppose port forwarding is already configured: the router forwards a port on the public IP to some machine on the LAN. Now reach “public IP:port” from another machine on the same LAN. What happens?
The packet arrives at the router, which sees its own public address as the destination, rewrites it to the internal machine, and forwards. The internal machine receives the packet, sees a source address on its own subnet, and replies directly — bypassing the router. The originator is waiting for a reply from the public IP but receives one from a LAN address; the four-tuple doesn’t match, and the packet is dropped.
This hairpin failure occurs when a same-subnet server replies directly without appropriate source translation. Other subnets, policy routes and NAT implementations behave differently. Inspect the actual topology.
The converse holds too: a successful test from inside doesn’t prove an internet visitor can connect — the router may be hairpinning correctly while the ISP blocks that port further upstream.
Use local tests to inspect listeners and hairpinning, and external tests for the public path. Label each observation with its path.
Before DDNS, find out how often the address changes
Once CGNAT is ruled out, the next step is usually DDNS: periodically write the current public IP into an A record. There’s an easy-to-skip prerequisite — establish how often that address actually changes.
A residential public IP typically changes when the line reconnects, at a frequency set by the ISP’s policy and how often you reconnect. If the address holds for weeks, the DDNS update interval can be relaxed. If it changes daily, you need a correspondingly short DNS TTL, or resolvers will keep pointing at a dead address.
Shorter TTLs increase queries after cache expiry, rather than requiring every visitor to resolve every time. Choose using recursive caches, address changes, update delay and permitted downtime.
Incidentally, the DDNS script’s own IP lookup needs the same multi-source fallback. With a single echo service, an outage can make the script write a wrong address, or silently stop updating without raising an error.
Don’t assume anything about IPv6
This line has a real ISP-assigned IPv6 address on the NIC, which ought to be simpler than v4 — no NAT, no port forwarding. In practice everything dropped: unreachable by ping from the cloud host, port connections timing out.
A default route describes default outbound or reply routing. It does not alone establish the inbound path. Inspect prefix routes, firewalls and captures to locate the IPv6 failure.
The subtler trap is how you obtain your own IPv6 address for an AAAA record. The instinct is to ask an echo service, but that reports the address on the outbound path. Here, outbound v6 detoured through that bypass device to an entirely different provider, and the address the echo service reported bore no relation to the one on the NIC.
Choose a valid global address on the service interface for AAAA, excluding temporary, stale or wrong-interface addresses, then verify the application externally. An echo service is an egress comparison. The Linux command below lists candidates; use the appropriate interface tool on macOS.
ip -6 addr show scope global | grep inet6
Outbound and inbound are independent paths — that is the whole point. An echo service can only ever tell you about outbound.
And then we bypassed inbound entirely
After all that measurement, the conclusion was to run every home service through a tunnel and open no inbound ports at all.
An outbound tunnel can avoid some residential ingress-port and DDNS requirements. It still needs working egress, a provider entry and a certificate policy; network and validation constraints remain.
Keep these observations for comparison. Public egress and ping alone do not establish the absence of CGNAT; confirm direct inbound through an outside request to the intended application.
Stated more generally: knowing a path is closed and not knowing whether it is open are different states. The first lets you commit to an alternative; the second keeps pulling you back to re-examine it every time something goes wrong.
The method, in short
Whatever you are measuring, this holds:
Validate listeners, LAN and public paths separately. In a proxy environment, add application responses and target-side evidence to establish where probes arrived.
Include a control with a known answer in every measurement. If the control gives the wrong answer, discard the reading. This matters more than any specific probing technique, because it catches the whole class of “the instrument was broken and I blamed the subject.”
Record timeouts, RST, ICMP, application errors and target packets. An unbound TCP port commonly sends RST; filtering commonly times out, but policies and return paths can change either. A control port alone cannot localise the cause.
Never treat an outbound observation as an inbound fact. Echo services, egress-IP lookups, outbound traceroutes — all describe outbound only. Inbound has to be confirmed by probing inward.