forked from bubuntux/nordvpn
-
Notifications
You must be signed in to change notification settings - Fork 19
Network Diagnostics Guide
Alexander Zinchenko edited this page Mar 29, 2026
·
2 revisions
The container includes a built-in diagnostic tool at /usr/local/bin/network-diagnostic that provides comprehensive network and VPN status information.
-e NETWORK_DIAGNOSTIC_ENABLED=true# Full diagnostics
docker exec vpn /usr/local/bin/network-diagnostic
# Quick IP + location check only
docker exec vpn /usr/local/bin/network-diagnostic --basicOutputs a single line:
Public IP address 203.0.113.42, location Amsterdam NL
Returns exit code 0 on success, 1 if the public IP couldn't be determined.
Produces a comprehensive report covering all sections below.
═══════════════════════════════════════════
OpenVPN DIAG — 2026-03-22 16:30:00 UTC
VPN: CONNECTED | iptables: nft | Kernel: 6.8.0-45
═══════════════════════════════════════════
- Interface name (tun0/tap0)
- Common name, local/remote ifconfig addresses
- Route gateway
- Connected peer IP:port
- Protocol (UDP/TCP)
- Local port
- Connection uptime (e.g.,
2d 14:30:45)
-
ip addr— all interface addresses -
ip link— link states -
ip route— routing table -
ip rule— policy routing rules
- Full iptables/ip6tables filter and NAT table dumps
- Detects whether nft or legacy backend is in use
- JSON output from IP lookup service
- Shows IP, city, country, ISP/org
- Contents of
/etc/resolv.conforresolvectloutput - For each nameserver: geolocation lookup (city, country, organization)
- Resolver identity via
whoami.cloudflareorhostname.bindqueries
- IPv4/IPv6 ping tests
- Traceroute to public test IP
- Route validation verdicts
The diagnostic tool uses a 2-tier fallback to determine your public IP:
| Tier | Service | What it returns |
|---|---|---|
| 1 | ipinfo.io/json |
IP, city, country (single JSON request) |
| 2 |
ifconfig.co + /city + /country-iso
|
IP, city, country (separate requests) |
Each request has a 4-second timeout. Tier 2 is only tried if tier 1 fails.
The diagnostic tool queries OpenVPN's management interface (localhost:7505) for live connection data:
| Command | Data returned |
|---|---|
status |
Connected clients, traffic stats |
state |
Connection timestamp, remote IP, port, protocol |
From the state response, the tool calculates connection uptime and extracts the VPN server details.
Public IP address 185.93.1.42, location Zurich CH
| Symptom | What to check in diagnostic output |
|---|---|
| Wrong country | Public IP geolocation — confirms which exit you're using |
| DNS leaks | DNS section — nameservers should be VPN-provided (10.x.x.x) |
| No connectivity | VPN status line — check if connected, verify tun0 exists |
| Slow speeds | Connection details — check protocol (UDP vs TCP), server load |
| Firewall issues | Iptables dump — look for missing ACCEPT rules on tun0 |
See also: Troubleshooting
Configuration
- Server Selection
- Server Groups
- Technologies
- IPv6 Configuration
- Automatic Reconnection
- Local Network Access
- VPN Gateway Mode
- OpenVPN Options
- Custom DNS
- Permissions
Security
Examples
Operations
Reference