Hamachi for LAN games: how to connect when host has double NAT
By Ryan Mercer Updated 8 min read
Some links on Gaming Past are affiliate links: if you sign up or buy through them we may earn a commission, at no extra cost to you. We recommend a tool only where it fits the problem, and say who should skip it.
On this page (8 sections)
- The short version
- What double NAT is and why it blocks LAN games
- How Hamachi creates a virtual LAN to bypass NAT issues
- Step-by-step Hamachi setup for host and players behind double NAT
- Common connection problems and how to fix them with Hamachi
- How to detect double NAT on your network
- When Hamachi’s workaround won’t fix double NAT connection issues
- Questions people still ask
In short: Detect double NAT by checking your router's WAN IP and gateway IP; if both are private, you have double NAT. Hamachi creates a virtual LAN to bypass this. Use its relay mode if direct connection fails, but it won't work if routing or firewall blocks Hamachi.
Part of our guide on ping booster review
How to detect double NAT and set up Hamachi so all players connect in LAN games without router changes.
| Double NAT IP range | 192.168.x.x / 10.x.x.x |
|---|---|
| Typical router LAN IP | 192.168.1.1 |
| Hamachi direct connection rate | 60-80% success |
| Relay mode latency increase | +30-100 ms |
| Hamachi port | 12975 UDP |
The short version
- Double NAT causes LAN game connection issues by blocking peer-to-peer links.
- Hamachi creates a virtual LAN that can bypass double NAT restrictions.
- Relay mode in Hamachi helps when direct peer connections fail behind double NAT.
- Hamachi won't work if firewalls or ISP policies block its traffic.
- Manual router changes can sometimes solve double NAT but often require admin access.
What double NAT is and why it blocks LAN games
Double NAT happens when two routers in a network both perform Network Address Translation. This usually occurs if your internet connection passes through a modem-router combo plus another router you control.
Each router assigns private IP addresses behind it, typically in ranges like 192.168.x.x or 10.x.x.x. The host’s device then gets an IP hidden behind two layers of private networks.
LAN games rely on direct peer-to-peer connections over local IP addresses. Double NAT blocks incoming connections because the outer router does not know how to forward traffic correctly to the inner host.
You might notice symptoms like connection timeouts, inability to host or join LAN games, or excessive lag caused by failed direct packet routing. The other half of this decision is which is better exitlag or noping.
Double NAT can also cause issues when players try to use UPnP (Universal Plug and Play) for automatic port forwarding. Since two routers handle NAT, UPnP requests may not pass through the first router, leaving ports closed on the outer NAT layer. This blocks incoming connections needed by LAN games.
The range of private IP addresses used internally typically includes 192.168.0.0 to 192.168.255.255 or 10.0.0.0 to 10.255.255.255. When devices get addresses in these ranges twice, the outer router cannot forward packets to the inner host without manual configuration.
A quick test for double NAT is to run tracert to any external IP. If you see two hops with private IP addresses before reaching the public internet, your connection is double NATed. This confirms two routers are translating addresses along the path. We go through testing mudfish vpn for mmorpgs step by step elsewhere on the site.
How Hamachi creates a virtual LAN to bypass NAT issues
Hamachi creates a secure virtual private network that simulates a LAN over the internet. It assigns virtual IP addresses to each player connected to the same Hamachi network.
This bypasses NAT restrictions by routing packets through Hamachi’s servers or directly peer-to-peer if possible. Hamachi works around double NAT by avoiding traditional router port forwarding.
It tries direct peer connection first; if that fails, it switches to relay mode. Relay mode routes traffic through Hamachi’s servers, which adds latency but enables connection when NAT prevents direct links. We cover high ping in left 4 dead 2 in its own article.
Using Hamachi means your game thinks everyone shares the same LAN, allowing multiplayer games that require local network presence.
Hamachi assigns each connected device a virtual IP in the 25.x.x.x range. This is a reserved block for Hamachi’s virtual networking and never conflicts with typical home LAN IPs.
In direct peer-to-peer mode, Hamachi attempts a UDP hole punch to establish a direct connection even through NAT devices. This method works when at least one router supports UDP hole punching, which many modern routers do. If that sounds like your situation, read up on using tcpdump for network loss next.
The fallback relay mode sends encrypted game packets through Hamachi’s servers. It adds about 30-100 ms latency depending on geographic distance but ensures connectivity even with strict double NAT setups.
Step-by-step Hamachi setup for host and players behind double NAT
All players, including the host, must download and install Hamachi. After creating a Hamachi account, the host creates a new Hamachi network and shares the network name and password with players.
Players join the same Hamachi network using those credentials. Each device gets a virtual IP address like 25.x.x.x. Use this IP to connect in the game as if it’s a LAN address. The other half of this decision is when game booster won't help.
Check connectivity within Hamachi by pinging other players’ virtual IPs. If ping works but the game does not connect, verify firewall settings to allow Hamachi and the game.
If players cannot connect directly, force Hamachi to use relay by disabling peer-to-peer mode in its advanced settings. This increases latency but bypasses double NAT restrictions.
- Download and install Hamachi on all devices.
- Host creates a Hamachi network and shares credentials.
- Players join the network using credentials.
- Use Hamachi virtual IP addresses to connect in-game.
- Test ping between Hamachi peers to confirm link.
- If connection fails, switch Hamachi to relay mode.
Common connection problems and how to fix them with Hamachi
One frequent problem is firewalls blocking Hamachi’s UDP port 12975. Check your router and operating system firewall settings to allow this port.
Hamachi relies on UDP; if your ISP blocks or throttles UDP packets, you may face connection drops or failure to connect at all.
Sometimes double NAT is too restrictive, or the host’s router settings block inbound connections even through Hamachi’s relay mode.
If Hamachi connections fail repeatedly, try toggling its peer-to-peer and relay modes, restarting Hamachi, or rebooting routers. Also, check for IPv6 conflicts if enabled.
Hamachi’s relay increases latency by typically 30-100 ms, which can cause lag spikes in fast-paced games.
- Firewall blocking – allow Hamachi UDP port 12975.
- ISP blocking UDP – test with another network.
- Router strictness – try relay mode or router config.
- Software conflicts – disable other VPNs or proxies.
How to detect double NAT on your network
First, find your router’s WAN IP address via its web interface. If this IP is in a private address range, you are behind another NAT device.
Compare the WAN IP to your PC’s default gateway. If both are private IPs, not public, you have double NAT.
Use online tools or command prompt to check your public IP. If it differs from the WAN IP shown on your router, double NAT exists.
This means your ISP modem or another router before yours is also NAT translating. This creates the connection blocking issues for inbound gaming traffic.
Another method to detect double NAT is to log in to both your modem-router and your personal router and check their respective LAN IP address ranges. If both assign private IPs in overlapping ranges, this confirms double NAT.
Some ISPs use Carrier-Grade NAT (CGNAT), which is a form of double NAT on the ISP side. In this case, your modem-router’s WAN IP is also private, and you cannot control the outer NAT device. This makes hosting LAN games more difficult.
You can also run the command netstat -r on Windows or route -n on Linux/macOS to see routing tables. If the default route points to a private IP instead of a public IP, double NAT is present.
- Log into your router and find WAN IP address.
- Check if WAN IP is in private range (e.g. 192.168.x.x or 10.x.x.x).
- Run
ipconfig /alland note your default gateway IP. - If both are private, double NAT is present.
- Verify your public IP via an online service; mismatch confirms double NAT.
When Hamachi’s workaround won’t fix double NAT connection issues
Hamachi depends on UDP traffic on port 12975. If your firewall or ISP blocks this, neither peer-to-peer nor relay mode will work.
Some corporate or school networks restrict VPN software or virtual adapters, preventing Hamachi from establishing a tunnel.
If your router is set to block VPN passthrough or has strict outbound rules, Hamachi connections fail.
Games that require direct broadcast or multicast traffic over LAN may not fully work because Hamachi only simulates unicast connections.
In these cases, router configuration changes or alternative VPN solutions might be necessary.
- Firewall blocks Hamachi ports or protocols.
- ISP restricts VPN or UDP traffic.
- Network policies prevent virtual adapters.
- Games rely on LAN broadcasts not supported by Hamachi.
Hamachi is a practical free option to bypass double NAT for LAN games but expect added latency via relays.
Questions people still ask
Can Hamachi reduce lag or improve ping in games?
Hamachi creates a virtual LAN but does not optimize or reduce ping. It may add latency, especially in relay mode.
Is double NAT common in home networks?
Yes, especially if you use your ISP’s modem-router plus a personal router, or multiple routers chained.
Can I fix double NAT by changing router settings?
Sometimes. Enabling bridge mode on your modem or configuring port forwarding helps, but requires admin access.
Why does Hamachi switch between direct and relay mode?
It attempts direct peer connections first for best latency; if blocked, it uses relay servers to maintain connection.
Are there alternatives to Hamachi for this problem?
Yes, alternatives include ZeroTier, Radmin VPN, and manual port forwarding, each with different setup complexity.
Does Hamachi work on consoles and mobile devices?
Hamachi officially supports Windows, macOS, and Linux. Consoles require workaround or different VPN solutions.