Network technology

VPN operations and troubleshooting: DNS, routing, IPv6 and MTU

“The VPN connects, but the application is intermittent” does not identify a fault. Connection status covers only part of the path; resolution, return routes, address families and packet sizes can fail independently. 稳付pay uses evidence collection before configuration changes to narrow issues to testable causes.

Contents

Preserve evidence and define the boundary of “not working”

Record time, client network, target domain, application error, latest changes and whether one or all users are affected. Compare the same device and target, not a working phone browser against a failing server API. Redact tokens, cookies, private keys and real business data, retaining only necessary diagnostic information.

Change one variable at a time and record before-and-after results. Restarting may temporarily help but loses counters and evidence; inspect first, then decide. If one domain fails while internal IP services work, there is no reason to regenerate every key immediately.

  1. Peer reachableCheck public address, protocol, port and handshake.
  2. Correct pathCheck routing, AllowedIPs and the return route.
  3. Correct namingVerify DNS results, resolver and address family.
  4. Complete application workflowTest small requests, large responses and persistent connections.
Retain reviewable evidence at each step so an application fault is not misdiagnosed as total VPN failure.

Layer one: interface, endpoint and handshake

For Linux WireGuard, start with the following read-only checks. Other VPNs need equivalent interface, peer and traffic statistics, not just a green GUI button.

ip addr show dev wg0
sudo wg show wg0
ip route show
ip rule show

Confirm interface existence and address, then contact an authorized tunnel target and observe handshake time and counters. With no recent handshake, prioritize both public keys, Endpoint address, UDP rules and client outbound connectivity. With a healthy recent handshake, investigate the data path.

Interpret idle status alongside traffic. WireGuard does not send continuous keepalives by default, so an old handshake does not prove failure. A handshake likewise does not prove database permissions. A NAT client that needs to preserve its mapping may use PersistentKeepalive, but it is not a universal timeout fix.

Layer two: outbound and return paths plus access scope

On the client, run ip route get 10.77.0.1 with the actual internal target in place of the example address, then inspect the selected interface and source. For policy routing, also inspect ip rule and the relevant tables; the main table alone may omit effective rules.

WireGuard AllowedIPs selects outgoing peers and restricts each peer's incoming tunnel source addresses; wg-quick also uses it for route configuration. Sending packets to wg0 does not prove wg0 can select the correct peer. Do not copy identical subnets across server Peers to “expand permissions.”

Accessing the tunnel peer itself differs from forwarding through it to a third server. Forwarding requires IP forwarding, forwarding-chain rules and a target return route. Overlapping home and company subnets can keep traffic local. Replan or explicitly design translation rather than merely reordering client connections.

Layer three: IP works but names fail—check DNS

DNS translates names to addresses. Following the official systemd resolvectl manual, first use resolvectl status to inspect current resolvers and link DNS settings, then use resolvectl query example.com to verify system resolution. These commands apply to Linux with systemd-resolved; other clients need their corresponding tools. Do not assume every system uses the same DNS manager.

Check who receives the query, whether routing reaches that resolver and whether the result belongs to the intended environment. Internal domains often require internal DNS; a public resolver's nonexistent result is not a key fault. Conversely, internal DNS may not resolve every public domain. Split-domain resolution can be better than replacing global settings.

Browsers may use their own encrypted DNS and differ from system commands. Identify the application's real resolution path before changing configuration, then inspect caches and split-domain rules. For HTTPS tests, entering an IP may cause certificate-name mismatch. Preserve the real domain and use controlled resolution validation.

Layer four: validate IPv4 and IPv6 separately

One domain may return both A and AAAA records, and clients may try IPv6 first. An IPv4-only VPN does not give IPv6 the same path: it may bypass locally or time out on unavailable IPv6. A changed public IPv4 address alone is not complete full-tunnel acceptance.

Inspect ip -6 route, then separately use curl -4 and curl -6 against an authorized HTTPS destination. Forcing an address family is diagnostic, not a permanent way to hide faults. If the target lacks that family, failure is expected.

If IPv6 is required, plan addresses, routes, forwarding and firewall rules together. If explicitly IPv4-only, document that scope and use controlled client policies to prevent conflicting direct paths. Do not casually disable IPv6 globally; other services and container networks may depend on it.

Layer five: small packets work but large responses stall—consider path MTU

MTU describes a link's packet capacity. Tunnels add encapsulation overhead and path links may differ; path MTU discovery identifies these limits. Blocked control messages or path changes can let small probes succeed while larger TLS responses, uploads and transfers repeatedly retry.

Use ip link show dev wg0 Inspect interface settings and use tracepath 10.77.0.1 to help observe an authorized path. Output depends on peer and intermediate responses, so it cannot replace application tests. In controlled IPv4 tests, vary lengths with ping -M do -s 1200 10.77.0.1 for comparison; the length parameter is not the final interface MTU.

If evidence points to packet size, record the original value, adjust narrowly, retest small and large responses and inspect necessary ICMP policy. No single smaller number is best everywhere. One working ping does not prove resolution; verify throughput, stability and persistence after restart.

Two troubleshooting scenarios: connect symptoms with evidence

Scenario one: the backend opens but the order-management domain times out

Internal backend IPs work and wg handshakes and counters are normal, but an internal name fails. A new client retained the hotel's public resolver while the name exists only in company DNS. Fix internal resolution and resolver reachability, testing both internal and public names. Regenerating VPN keys will not teach public DNS internal records.

Scenario two: login works but report export stalls

Small JSON requests work for the same account, while a large report repeatedly waits after transfer begins. Exclude permission and timeout errors in application logs, then compare response sizes and identify packet-size dependence. After locating path MTU, fix tunnel MTU and relevant control-message policy, then validate full export and large uploads. Raising timeouts only prolongs waiting without removing the link cause.

These are instructional scenarios, not 稳付pay customer incident reports. Judge real environments from observed state and application logs; similar symptoms do not justify copying a fix without evidence.

Turn findings into operations records someone else can use

Check targetInformation to recordAcceptance evidence
TunnelInterface, peer and key-version identifierHandshake and counter changes after generating traffic
NetworkOutbound and return routes; IPv4 and IPv6 scopeAuthorized targets reached along the intended path
ApplicationDNS, certificate, status code and request sizeActual business operation completes
RecoveryPersistent configuration and change timeRestart and rollback drills pass
  • Retain prechange configuration, original MTU and firewall-rule summaries with an explicit rollback method.
  • Test internal targets, required public destinations and DNS separately; ping is not the entire acceptance test.
  • Record failure proportions and recovery time, with alert thresholds suited to the business.
  • Maintain separate device credentials, revoke retired devices promptly and never paste private keys into tickets.
  • Verify post-restart state so a temporary fix does not become the next incident.

Even with stable networking, independently validate payment signatures, order IDs, amounts and idempotency. Retries must not amplify requests without limits, and network timeouts do not prove payment failure. Business systems need queryable and recoverable order-state workflows.

References and technical documentation

The official sources below support protocol and implementation checks. Code and scenarios illustrate technical concepts; validate your environment and production integration protocol separately.

  1. Ubuntu:Troubleshooting WireGuard VPN
  2. WireGuard official wg manual
  3. systemd: resolvectl manual
  4. Linux ip-link manual
  5. iputils: tracepath manual
  6. iputils: ping manual
  7. Official curl command-line manual

Keep improving your site

Check each step of networking, orders and funds notifications against your business scenario. Discuss payment integration and USDT monitoring through the contact page.

Contact 稳付pay ↗