SSH Guru Blog.
← SSH Guru Blog
SSH Bridges
·4 min read

SSH behind CGNAT without port forwarding

sshcgnatremote accesshome lab
Person in casual attire using laptop on cozy grey sofa, creating a home workspace vibe.
Photo: kaboompics.com on Pexels

SSH behind CGNAT without port forwarding

Your ISP put you behind CGNAT. You knew because port forwarding stopped working, or because your router’s WAN address is a 100.64.x.x address instead of a public one. You can still browse the web and use apps, but inbound connections to your home server never arrive. That breaks SSH access to your Raspberry Pi, Proxmox host, or NAS from outside the house.

Most home users respond in one of two ways. They either open port 22 on the router and point it at the server, or they give up on remote access entirely. Both are bad options. Opening SSH to the internet puts your login page in front of every bot scanning the internet. Giving up means you cannot check disk space, restart a container, or look at logs when something breaks while you are away.

CGNAT means your ISP shares one public IPv4 address across many customers. Your router gets a private address from the ISP’s own range, and there is no public port you can forward to your internal server. Even if you configure port forwarding on your home router, the ISP’s gateway has no rule to send traffic back to you. UPnP and DDNS do not fix this, because neither one creates an inbound path through the carrier’s address translation.

How an outbound bridge works

The practical alternative is to stop waiting for inbound connections. Instead of exposing your server to the internet, you run a small outbound client inside your network. It dials out to a relay, keeps the connection open, and your browser SSH client connects through that same relay. Because the connection originated inside your network, CGNAT does not block it. You do not need a public IP, a static DNS name, or any router changes.

SSH Guru’s bridge is built around an ESP32-S3 board. You flash it from Chrome or Edge over USB using the browser’s Web Serial API. Once it is running, you write allow-list rules directly to the board. Those rules say which LAN hosts and ports the bridge may reach, and they can only be changed over USB again. The board dials outbound and never opens an inbound listener on your network.

This design matters on more than just cable or fiber. Starlink, 5G home internet, and many mobile hotspots also put subscribers behind CGNAT. If you travel with a laptop and need to reach your home server from a coffee shop, a hotel, or a locked-down work machine, a browser-based client that works through the bridge means you do not need to install SSH software or adjust the local network.

Allow-lists are the part people should spend the most time configuring. It is tempting to write one rule that opens the whole internal subnet, but that defeats the purpose. If someone compromises the bridge, they should only reach the specific hosts and ports you listed. We built the bridge so rules live on the board itself and require physical USB access to change. That is slower than editing a config file remotely, but it is the trade-off we accept for a device that sits inside your network and dials out.

You should still treat the bridge as a path into your network. Use key-based authentication, not passwords. Keep the server’s SSH version current. If you are connecting from a shared or public computer, do not save your passphrase in the browser, and close the tab when you are done. The browser client keeps your private key encrypted under your passphrase and does not send it to SSH Guru, but the machine you type on is still your responsibility.

Read-only watches pair well with a bridge. You can schedule checks for disk space, CPU, memory, failed logins, pending security updates, certificate expiry, Docker health, and backups. If something fails, the watcher sends a Telegram alert. Because watches are read-only and accept no commands back, they do not expand your attack surface. They tell you there is a problem, and you decide whether to open the SSH session and fix it.

There are limits. The bridge is for interactive SSH and light administrative traffic. It is not designed for bulk file transfers over CGNAT, and it does not give you unrestricted access to your entire local network. If you need to move large datasets, a local sync job or a physical drive is still the better tool.

CGNAT is not going away. IPv6 adoption is uneven, and carriers have little incentive to hand out public IPv4 addresses to residential customers. The reliable way to reach your home server is to build access that works around the constraint instead of fighting it. An outbound-only bridge, strict allow-lists, and a browser-based SSH client keep you connected without turning your home network into a target.

If you want to set this up, the bridge setup starts with an ESP32-S3 and the browser flasher. The Free plan includes one bridge and three servers, which is enough to test it on a single home lab or Raspberry Pi.

How SSH Works Without Port Forwarding

Comments

No comments yet. Be the first.

Leave a comment

Comments appear once the author approves them.