DEV Community

Cover image for WireGuard Works on LAN but Not Remotely? Troubleshooting and Design Choices
HomeGrid VPN
HomeGrid VPN

Posted on Originally published at homegrid-vpn.com on

WireGuard Works on LAN but Not Remotely? Troubleshooting and Design Choices

When WireGuard works on your home LAN but fails remotely, check whether packets actually reach the server before rebuilding keys or changing unrelated settings. A successful LAN test does not verify your public endpoint, upstream NAT, or inbound firewall rules.

You installed WireGuard, tested it at home, and configured port forwarding. Then you turned off your phone’s Wi-Fi, tried over mobile data, and nothing worked.

The first question is simple: does the UDP traffic from the remote device reach your WireGuard server? Once you know where communication stops, you can decide whether to repair the direct connection or choose a design that connects outward from home.

First, distinguish a failed handshake from failed LAN access

An enabled WireGuard tunnel is not proof that its peer is communicating.

On a Linux server, inspect the latest handshake:

sudo wg show wg0

Enter fullscreen mode Exit fullscreen mode

Replace wg0 with your interface name. On phones and Windows, check the app’s handshake information and logs.

Generate traffic to an address configured to use the tunnel, such as the other peer’s VPN address, and compare the results. WireGuard stays quiet when there is nothing to send, so an old handshake timestamp during an idle period is not enough to diagnose a fault.

What happens during your test What to inspect next
The handshake does not update Endpoint, UDP reachability, listening port, firewall, keys
The handshake updates, but the NAS is unreachable AllowedIPs, routes, forwarding, return path, NAS access rules
An IP address works, but a hostname does not DNS and name resolution
Small transfers work, but larger transfers or some pages stall MTU and path restrictions

A working handshake does not prove that traffic can reach a NAS or use your home connection as an internet exit.

Reference: WireGuard Quick Start.

1. Test from outside your home network

Testing your public IP or DDNS hostname while still connected to your home Wi-Fi introduces another variable: NAT loopback. Whether a router can send that connection back inside depends on its implementation and configuration.

A failed loopback test does not prove that remote access fails. Conversely, a successful test using the server’s private LAN address does not test your ISP or port forwarding.

Turn off your phone’s Wi-Fi and test over mobile data. Verify that its Endpoint points to the externally reachable address or hostname, rather than a private LAN address.

This is an IPv4 example; replace the example hostname:

[Peer]
Endpoint = vpn.example.com:51820

Enter fullscreen mode Exit fullscreen mode

51820 is a common example, not a required port. Match the client’s destination port to the router’s external UDP port. If you use DDNS, verify that the hostname points to your current public address.

2. Check whether your home connection can receive inbound IPv4

A conventional IPv4 setup expects this path:

Remote device
    ↓ UDP
Home router's public IPv4 address
    ↓ Port forwarding
WireGuard server's private LAN address

Enter fullscreen mode Exit fullscreen mode

If another NAT sits upstream of your router, changing only your own router may not be enough.

Compare the router’s WAN address with your public IPv4 address

Read the WAN IPv4 address in your router’s management interface. Compare it with the address reported by an IPv4 address-checking service from home. Do not accidentally compare a WAN IPv4 address with a browser’s IPv6 result.

These ranges are not ordinary public IPv4 addresses:

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16
  • 100.64.0.0/10 — 100.64.0.0 through 100.127.255.255

The first three are private address ranges. The last is shared address space used for purposes such as carrier-grade NAT. See RFC 6598.

If you control both routers in a double-NAT setup, forwarding on the upstream router or changing the router arrangement may solve the problem. You may not have that control over an ISP’s CGNAT or an apartment building’s shared gateway.

The address comparison is a clue, not a complete diagnosis. Check your service plan and connection technology too.

IPv4-over-IPv6 services have different restrictions

Some ISPs, including providers in Japan, deliver IPv4 over an IPv6 access network. Do not assume every such service has the same inbound limitations.

Connection type What matters
MAP-E with a shared public IPv4 address Your allocated port set and the router’s forwarding support
A typical DS-Lite service Provider-side NAT and whether inbound mappings are offered
Double NAT inside your home Whether you can configure both routers
A building’s shared NAT Whether the building operator allows inbound mappings

With MAP-E, an assigned external UDP port may work even when 51820 is unavailable. Whether the router can translate that port to a different internal port depends on the device.

With a typical DS-Lite service, IPv4 NAT resides at the provider. A forwarding rule on your home router alone cannot establish an arbitrary inbound mapping there. Check the provider’s actual features and terms.

References: MAP-E, RFC 7597, DS-Lite, RFC 6333.

3. Match UDP, the destination address, and the listening port

If the connection supports inbound access, inspect the forwarding rule:

  • Is the protocol UDP?
  • Does the destination match the server’s current LAN address?
  • Does the internal port match WireGuard’s listening port?
  • Does the client’s Endpoint use the correct external port?

A DHCP address change can leave a forwarding rule pointing to the wrong machine. A DHCP reservation can make this easier to maintain.

If WireGuard runs on the router itself, inspect rules permitting UDP traffic to the router, rather than forwarding to another LAN host.

Containers and virtual machines add another boundary. Check the path from the host to the guest or container, including whether Docker publishes the UDP port rather than only TCP.

4. Observe packets with tcpdump

Move from configuration screens to the actual traffic. On the Linux server, observe the listening port:

sudo tcpdump -ni any 'udp port 51820'

Enter fullscreen mode Exit fullscreen mode

Use your real port. Enable the remote tunnel and generate traffic to a VPN destination. Stop the capture with Ctrl+C.

For a containerized server, inspect the host first and then the container if needed. A host capture on any does not directly expose every interface in a separate network namespace.

No matching inbound UDP appears

Check the Endpoint, external port, forwarding, upstream NAT, and the remote network’s UDP policy. Also verify the capture location and filter: an empty capture alone does not prove the ISP is blocking traffic.

UDP arrives, but the handshake does not update

Packets reached that observation point. Now inspect the host firewall, actual listening port, peer public keys, and any configured preshared key.

A packet visible in a capture may still be dropped by the host firewall. Its presence also does not prove it is an authenticated WireGuard request. Inspect specific rules and counters instead of disabling the entire firewall.

A generic UDP port checker is not decisive

TCP-only checking tools cannot test a WireGuard endpoint. UDP does not provide the same simple connection test as TCP, and WireGuard normally does not answer unauthorized requests.

Use an actual configured peer, handshake information, and packet observations together. A generic probe receiving no answer is not enough to declare the endpoint closed.

5. If the handshake succeeds, inspect the LAN route

If the server’s VPN address works but a separate NAS does not, inspect:

  • The client’s AllowedIPs for the NAS address or home subnet.
  • The server’s peer configuration for the client’s VPN source address.
  • IP forwarding and forwarding firewall rules on the server.
  • The return route from the NAS to the VPN client.
  • SNAT, if your design uses it instead of a return route.
  • The NAS’s own firewall and service access rules.
  • Overlapping address ranges between the remote LAN and the home LAN.

AllowedIPs participates in outgoing peer selection and validates source addresses on received tunnel packets. OS routing also matters. wg-quick normally derives routes from AllowedIPs, but other tools or settings may behave differently.

References: WireGuard Cryptokey Routing, wg-quick manual.

Test the VPN address, the NAS’s IP address, and then its hostname. Avoid changing DNS and MTU at the same time. For a relevant container example, see WireGuard MTU behavior in Docker Desktop; its values are not universal recommendations.

IPv6 removes port forwarding, not inbound access requirements

Direct IPv6 may work when inbound IPv4 does not. However, it still requires a globally reachable server address and suitable inbound rules on both the router and server OS, as well as a reachable ISP path.

A link-local address starting with fe80::, or only a unique local address in fc00::/7 — commonly fd… — is not an internet-reachable endpoint.

Do not plan a trip around public Wi-Fi having IPv6

The remote network needs IPv6 too. IPv4-only public Wi-Fi remains common, so do not build a travel setup that depends on reaching your home IPv6 endpoint directly from airport, café, or hotel Wi-Fi. Correct home-side settings cannot create IPv6 connectivity on an IPv4-only remote connection.

A paper presented at NDSS 2025, “Off-Path TCP Hijacking in Wi-Fi Networks: A Packet-Size Side Channel Attack,” examined 80 real-world Wi-Fi networks, including cafés and hotels. 74 networks, or 92.5%, were IPv4-only; six, or 7.5%, had IPv6 capabilities. This is not an exact worldwide adoption rate, but it supports the practical concern that IPv6 is often unavailable on public Wi-Fi. See Figure 10 and the accompanying text, PDF page 11.

Existing equipment and captive portals are part of the issue. A captive portal handles login or acceptance of terms before internet access. For example, pfSense documents its captive portal as incompatible with IPv6. The whole guest-access system needs suitable support, not just its upstream internet connection.

Hotel Wi-Fi: IPv4 only
    ✕ No direct path to an IPv6 endpoint
Home WireGuard: global IPv6 address

Enter fullscreen mode Exit fullscreen mode

If mobile data works but hotel Wi-Fi does not, check IPv6 availability at the remote end before replacing keys or changing the server. Ordinary web browsing on Wi-Fi does not establish that IPv6 works.

Switching to an IPv6-capable mobile connection or tethering consumes mobile data. A file transfer or remote work session that you expected to carry over free hotel Wi-Fi can instead use a roaming allowance and require additional data purchases or charges, depending on your plan.

IPv6 direct access is not restricted exclusively to mobile networks: some Wi-Fi networks support it. But on an IPv4-only Wi-Fi network, you need another suitable connection. Mobile and roaming connections do not guarantee IPv6 either; check the carrier, plan, and visited network.

An IPv6-capable home does not make an IPv6-only VPN endpoint dependable on travel Wi-Fi.

Do not enable “IPv6 pass-through” based on its name alone. Check the router’s implementation and firewall behavior, since it can affect reachability of other LAN devices too.

IPv6 is needed at both ends
Correct settings at home cannot provide IPv6 connectivity to an IPv4-only hotel network.

A working connection still leaves an exposed endpoint to maintain

Port forwarding and IPv6 inbound rules create paths for incoming connection attempts. Making the VPN work is only the start of maintaining that endpoint.

Recent advisories show why exposed network devices need attention

On June 22, 2026, Singapore’s Cyber Security Agency warned about credential-harvesting attacks against internet-facing FortiGate devices and VPN portals, including brute-force, dictionary, and credential-stuffing attempts. It recommended restricting or disabling internet-facing administrative access. See the CSA advisory.

The February 2025 joint Security considerations for edge devices guidance also discusses vulnerabilities, misconfiguration, denial of service, and avoiding direct internet exposure of management interfaces.

These are not evidence that the same attacks work against a home WireGuard UDP endpoint. WireGuard peer authentication differs from password-based portals. They illustrate the wider operational issue: maintain the device and its exposed services, not just the VPN configuration.

Ask whether you can keep up with:

  • Updates for WireGuard, the OS, router, and management tools.
  • Checking for accidentally exposed management interfaces, SSH, or NAS services.
  • Revoking lost or retired devices’ keys.
  • Limiting the LANs accessible after a VPN connection.
  • Handling disruption from excessive traffic or service failures.

An open UDP port does not let an attacker without the required keys connect as an authorized peer. However, a vulnerability in reachable packet-processing code that can be exploited before authentication could create a different entry path. This is a design consideration, not a claim that WireGuard currently has such a vulnerability.

Key authentication and silence toward unauthorized probes do not eliminate the need to maintain the system processing inbound packets.

What can an attacker reach after a compromise?

A stolen client key and a compromised VPN server are different incidents, but both require thinking about reachable networks.

If NAS devices, workstations, development servers, and router management interfaces share a LAN without appropriate restrictions, an attacker may be able to explore and attack several devices from an initial foothold. This is lateral movement.

Network reachability is not the same as permission to read files or administer a service. Service authentication and host firewalls still matter. Nevertheless, a broader reachable network gives an attacker more places to try stolen credentials or other vulnerabilities.

The useful starting point is default deny: authorize only the LAN subnets a device needs. Authenticating a peer answers who is connecting. Authorizing access answers which LANs that peer may reach.

Subnet-level permissions also keep everyday administration manageable. You need not add a separate VPN rule every time you add another PC or NAS inside an already authorized LAN. Leave unrelated LANs unauthorized and separate networks with different protection requirements.

A compromised authorized device may still be used as a stepping stone within its permitted reach. If it has another route into a different LAN, that path needs its own controls. Default deny remains useful because it avoids granting every connected device access to every LAN at the outset.

You can build this with WireGuard peer-to-address mappings, forwarding firewall rules, and network segmentation. But permissions must stay aligned with device enrollment, removal, and key revocation. A broad “VPN to LAN: allow” rule does not provide that distinction, and client-side AllowedIPs alone should not enforce your access policy.

If the VPN server itself is compromised with sufficient privileges, an attacker may also change controls on that server. Consider boundaries enforced elsewhere for important networks.

Running a home VPN means maintaining both its entry point and the access available beyond it.

A home endpoint can reveal location clues

WireGuard encrypts tunnel contents, not the destination address in the outer IP header. Someone positioned to observe traffic on your travel network may see connections to your home endpoint, whether it uses IPv4 or IPv6.

GeoIP databases can provide country or regional estimates. ASN and ISP information can identify the associated network. These are clues, not an exact street address: MaxMind explains that its GeoIP data cannot locate a specific household, person, or street address.

The concern is that a home-side address can become associated with activity on a travel network, potentially alongside account or repeated-connection records. An address alone does not establish that the destination is the user’s home. Changing the UDP port does not remove the address from the outer packets.

An attacker may target the router rather than WireGuard

If an observer learns the home-side endpoint address, other internet-reachable functions on that address may also attract investigation. An exposed router management interface with an exploitable vulnerability could provide an entry path without breaking WireGuard authentication.

JPCERT/CC’s July–September 2025 observation report discusses routers with internet-accessible management interfaces and the risks of outdated firmware, unauthorized access, and use as attack infrastructure.

Knowing an IP address does not make a LAN-only management interface reachable. With IPv6, the VPN server and router can also have different addresses. An actual attack still needs a reachable function and applicable conditions.

The residential connection itself can be valuable to attackers

“There is nothing worth stealing at home” misses another motive. A residential internet connection can itself be useful as a relay for someone else’s traffic.

On July 21, 2026, Japan’s NICT, together with the Ministry of Internal Affairs and Communications and the National Police Agency, published information on residential proxies abusing home IoT devices. Routers and cameras can relay traffic used to obscure the source of unauthorized access or fraud. NICT reported observing up to approximately 27,000 exit IP addresses in a day from January 2026 onward. That is an observation of exit addresses, not a count of routers all compromised through vulnerabilities. See NICT’s announcement.

You are protecting more than files on your NAS. You also want to prevent your connection from becoming someone else’s relay.

Public addresses can be discovered without observing your VPN traffic. Even so, there is no need to supply extra clues linking your travel activity to a home endpoint. Reducing unnecessary exposure of that endpoint and reducing directly reachable services are complementary choices.

Disable unnecessary WAN management, update firmware, and replace unsupported equipment. Updates are essential, but a fully patched device may still have an undisclosed or unpatched vulnerability. Price alone does not determine security.

Reducing the attack surface is useful alongside patching. A secure WireGuard configuration does not establish that every other exposed function on your home network is secure.

Keep a direct endpoint, or change the connection design?

A direct home WireGuard setup is a valid option when the connection supports it and you can manage the exposed endpoint, keys, and access rules.

An outward connection from home is worth considering if you do not want to change a family home’s router or ISP, depend on IPv6 at your travel destination, or maintain home-side inbound rules.

You can build a relay on a VPS yourself. That also means maintaining the public VPS, WireGuard, routes, firewall rules, keys, updates, and fault handling.

P2P without manual forwarding still receives direct traffic

P2P VPNs that use NAT traversal establish direct connectivity by sending packets from both sides and creating NAT and firewall state that accepts the peer’s return packets.

In other words, the path for packets from outside to inside is established dynamically. This differs from a permanent forwarding rule accepting unsolicited traffic, and the permitted source range and lifetime depend on the NAT, firewall, and traversal method. But “no manual port forwarding” does not mean the home endpoint never receives direct external traffic.

It also does not make traffic invisible. While a direct P2P connection is in use, an observer on the travel network may see the home-side public address and UDP port, along with timing and volume. Returning packets expose that endpoint as their source.

Not responding to an unauthorized scan does not hide the IP address and port used in a live connection. Observing them does not decrypt the tunnel or establish that any arbitrary third party can connect.

NAT traversal reduces manual forwarding work; it does not remove the packet-processing implementation or its maintenance needs. An on-path attacker and an unrelated off-path attacker have different opportunities, but a dynamically established path is not a substitute for vulnerability management.

Direct P2P and conventional direct home VPNs also share the exposure of a home-side endpoint address. That address can become a clue for investigating other exposed router functions and attempting entry through a separate exploitable service. Keeping the home-side address out of the direct VPN path reduces unnecessary disclosure, including in a threat environment where residential connections are abused as proxies.

Some products relay traffic when direct connectivity fails. In that case, the relay is the destination visible on the travel network. Check the actual connection path rather than treating every P2P session as identical.

Direct paths and Cloud Hub connections
Top arrow: direct traffic path. Bottom arrows: connection initiation. Tunnel data flows both ways.

HomeGrid VPN connects outward from home to a Cloud Hub

HomeGrid VPN uses a hub-and-spoke design. Both Home and Remote connect to a Cloud Hub.

Remote ──→ Cloud Hub ←── Home
        Both initiate toward the hub

Enter fullscreen mode Exit fullscreen mode

Home uses outbound communication, so the design does not ordinarily require IPv4 port forwarding, IPv6 inbound rules, or DDNS at home. Remote does not need a direct path to Home’s public IPv4 or global IPv6 address.

The VPN destination visible from travel Wi-Fi is the Cloud Hub. You do not need to present your home public address as the direct destination of that VPN connection.

This reduces the need for a direct home entry point and the occasions on which the VPN exposes your home endpoint. It does not automatically close unrelated management services already exposed on your router; review those separately.

Decision point Direct home WireGuard HomeGrid VPN
Home-side connectivity Inbound IPv4 and forwarding, or IPv6 reachability and inbound rules Outbound connection to the Cloud Hub
Router and ISP checks Public address, upstream NAT, inbound rules Reachability to the hub
Remote connectivity A path to Home’s endpoint A path to the Cloud Hub
LAN authorization Design and maintain peer mappings and firewall rules Default-deny LAN ACL with per-device destination-LAN permissions
WireGuard server maintenance Maintain the server and related software yourself No self-managed WireGuard server maintenance when repurposing a PC as an appliance

When Home is the internet exit, the traffic path is:

Remote → Cloud Hub → Home → Residential ISP → Internet

Enter fullscreen mode Exit fullscreen mode

The destination sees Home’s public exit address, as it would for ordinary internet access through that home connection. The Cloud Hub carries the VPN path; it is not the internet exit when Home is selected as the exit.

Turn an old PC into an appliance with a USB drive

Download the ISO image from the dashboard and write it to a USB drive with a suitable tool. Boot the old PC from that drive, let automatic installation run, and enter the activation token obtained from the dashboard. Connect it to the LAN to use it as the Home-side device.

You do not need to build and maintain a WireGuard server yourself with this appliance approach. It reduces both inbound configuration work and self-managed VPN server maintenance. Updating the household router remains normal network maintenance regardless of which VPN you use.

VPN connectivity does not automatically grant LAN access

HomeGrid VPN’s LAN ACL manages destination-LAN permissions for each connecting device. The initial state is default deny : connecting to the VPN alone does not grant access to destination LANs. Newly registered devices and newly added LANs require explicit authorization.

For example, allow your work PC to reach the work LAN while leaving a family phone unauthorized. VPN authentication and LAN authorization are separate decisions.

Permissions cover a destination subnet. Adding a PC or NAS within an already authorized LAN does not require adding each host to the VPN’s policy. This keeps everyday use simple while unrelated LANs remain closed. It is not a claim of per-host or per-port filtering.

An authorized device can still become a stepping stone within its reachable networks. Service authentication, host firewalls, and segmentation remain useful for those boundaries.

See Set where each device can go with LAN ACL for the configuration steps.

Default-deny LAN authorization
A VPN connection alone does not authorize LAN access. Permissions apply to the destination subnet.

Use the combined connection and authorization model at low cost

Authentication-linked access control is an established networking approach. You can implement it in a DIY WireGuard environment, but you also need to maintain the mapping between devices and permissions as devices and keys change.

HomeGrid VPN offers outward Home connections and default-deny LAN ACLs as a low-cost option for homes and small environments. The value here is the combination of the connection and authorization functions needed for this use case, rather than replacing every feature of an enterprise firewall. Check the official HomeGrid VPN site for current plans and conditions.

If you use a family member’s connection, obtain the subscriber’s consent and check the ISP’s contract terms.

Choose the architecture after checking reachability

Start with these checks:

  1. Test from a genuinely external connection.
  2. Generate tunnel traffic and check the handshake.
  3. If it fails, inspect the connection type, Endpoint, and UDP forwarding.
  4. Observe packet arrival before moving to host firewall and peer settings.
  5. If it succeeds, inspect LAN routes and the return path.

A direct connection may be straightforward to repair. But making an endpoint reachable and maintaining it are different jobs. IPv6 leaves remote-network requirements in place, while direct P2P still exposes the home-side endpoint on the live traffic path.

If you want to use travel Wi-Fi, reduce unnecessary disclosure of your home endpoint, avoid adding a direct home entry point, and authorize only the LAN subnets each device needs, HomeGrid VPN’s outward connection from Home is an option worth considering.

Before deployment, open HomeGrid VPN Connectivity Check from the HomeGrid VPN homepage to test whether your home network can communicate with HomeGrid VPN. Run it from the home network where you plan to install the device.

For the routing and exit model, see What is HomeGrid VPN? Using your home connection as a VPN exit.

Originally published at https://www.homegrid-vpn.com/blog/en/wireguard-outside-troubleshooting/

Top comments (0)