How a static IP over WireGuard works (and what it costs)
A "static IP over WireGuard" means a public address that lives somewhere else and reaches your machine through an encrypted tunnel. It is the standard way to get a fixed, reachable address when your own line cannot give you one. This page explains how the pieces fit, what you can build yourself, and what it costs either way.
The pieces
- A server with a public address. This is the end that visitors connect to. It has a fixed IPv4 address on the internet.
- A tunnel from your machine to that server. WireGuard is a common choice. Your machine opens the tunnel outward, so it works behind a home router and behind CGNAT without any port forwarding.
- Routing. The public server sends traffic for the fixed address down the tunnel, and your machine answers back through it.
Why your machine has to start the tunnel
Behind a router or a provider's shared address, nothing from outside can start a connection to you. Your machine can start one outward. Once it is open, traffic can flow both ways through it. That one outward connection is what makes a fixed inbound address possible.
The idle problem, and how it is fixed
A router or provider NAT forgets a quiet connection after a while. Then the tunnel looks up but stops passing traffic in one direction, and you stop being reachable until something wakes it. The fix is a keepalive: your machine sends a small packet on a timer so the NAT never forgets the flow. We reproduced this in our lab and tested the fix, with real output, in WireGuard behind NAT stops working when idle. We simulated the NAT and its timeout, so check the timeout on your own line.
Doing it yourself
You can build this with a small rented server that has a public IPv4 address, WireGuard on both ends, and a forwarding rule on the server for the ports you want to expose. It works and teaches you a lot. You also take on keeping that server updated and secure, watching it, and fixing the tunnel when it stops. The cost is the server rental plus your time.
Using TunnelNet instead
TunnelNet IP does the public-server side for you. You get a dedicated IPv4 address from our own block, routed to your machine. Your machine keeps an encrypted tunnel out to us and we route the address down it. It costs $10 a month and it works behind NAT and CGNAT with no port forwarding. Linux, WSL, macOS on Apple Silicon, Windows and iPhone each have an installer.
- SSH is open by default and every other port stays closed until you run
tnet ports allow. - An IPv6 /56 comes with the address.
- 1 TB a month is included, then your speed drops to 10 Mbit/s until the 1st. An extra 1 TB is $15.
- When a hub fails completely, we measured about 25 seconds before the address was reachable again. One kind of failure is not covered at all: if a hub stays up but stops forwarding traffic, there is no automatic failover (see the pricing page).
What it does not do
- It carries inbound traffic. For your own traffic to leave from the same address you need TunnelNet Full ($20 a month), which today works on Linux and on an iPhone.
- Outgoing mail on port 25 is blocked.
- There is no uptime guarantee yet. We publish the measured numbers on our uptime page instead.
See the pricing page for the plans.