fv does not connect: what to check
Read fv show and fv diag, and fix the usual causes when an fv run tunnel has no handshake, no traffic, no ML-KEM-1024 exchange, or a firewall that vanished.
This page is for a tunnel started with fv run from a config file. Start with two commands: sudo fv show <iface> prints the interface, the peers, the latest handshake and the counters, and sudo fv diag <iface> prints a verdict for each peer with the layer at fault and what to try next. fv diag --json prints the same for a script.
Symptoms
fv runstops at once and prints an error.fv runprintsfv: creating <iface>: ....fv --versionorfv genpskprintsunknown command: yourfvis older.fv showhas nolatest handshakefor a peer.- There is a handshake, but
pingthrough the tunnel gets no answer, or only some addresses answer. - Large transfers stall while small packets work.
post-quantum:readsoffwhere you expectedon, orpending,unsupportedorfailed, orresetskeeps rising.- Every other firewall rule on the machine disappeared after enabling
forestvpn-quantum@<name>. - An IPv6 address stopped working after the package was installed.
- A
PostDownorPreDowncleanup never ran. - A
PreUpcommand fails because the interface already exists. - Another global address on the interface disappeared after
fv runstarted. wg showlists nothing.- A tunnel to a stock WireGuard peer comes up late.
- On an ARM machine, apt finds no
forestvpn-quantum, orfvfails withExec format error.
Likely causes
- A missing option or a config error.
--ifaceand--configare both required. The file may hold a fieldfvrefuses, such asDNS,Table,SaveConfigor an unknown key. A[Peer]withoutAllowedIPs, anEndpointwith no port, a second[Interface]orPostQuantum = onalso stop the start. The error names the line or the peer.fv: resolving <host>:<port>means the host name inEndpointdid not resolve, andfv runstops. - No permission, or no tunnel device.
fv runneeds root and/dev/net/tun. In a container: root withNET_ADMINand/dev/net/tun. unknown commandfor--versionorgenpsk. Yourfvis older than these pages.- The handshake never starts. The keys do not match, the
Endpointor its port is wrong, a firewall drops the UDP port, the peer behind NAT sends no keepalive, or a host name inEndpointnow points elsewhere: it is resolved once, at start, to its first address. - The handshake works, the traffic does not.
AllowedIPson one end does not include the destination.fv runadds no route for a/0prefix, or for a prefix that contains a peer's endpoint. A firewall on the machine drops the tunnel's traffic. - The MTU is too high. With no
MTUline,fv runleaves the interface at the kernel's default. - The ML-KEM-1024 pair is wrong. Both ends
require, both endsrespond, a stock WireGuard peer at the other end, or aPresharedKeythat differs between the two files. - The exit-server unit.
forestvpn-quantum@.servicepulls in the exit-node firewall, which flushes the rule set of the machine. - IPv6 forwarding. The package turns on
net.ipv6.conf.all.forwarding, and with it on the kernel stops accepting router advertisements unlessaccept_rais 2. PreDownandPostDownnever run. Yourfvis older: it accepted them and did not run them when it stopped. Or the start never got as far as the tunnel: a failedPreUporPostUp, or a stop duringPreUp, runs no down hook. Orfv runwas ended by a hang-up (its terminal or SSH session closed) or SIGKILL.PreUpruns after the device exists. This differs fromwg-quick, which runs it before. After a clean start,PreDownalso runs after the tunnel has stopped forwarding:fv show %iandfv set %ifail in it.Addressreplaces the other global addresses.fv runremoves any other global address from the interface.- A different socket path.
wglooks in/var/run/wireguard, andfvkeeps its sockets in/var/run/forestvpn. - An ARM machine. The package and the binary are x86-64 only.
- Obfuscation with a stock peer. The first message of a shaped handshake is dropped, and the retry is plain.
Fix each cause
A missing option or a config error. Run sudo fv run --iface <name> --config <file> and read the first line it prints. Fix the line it names. The config reference lists the values each field takes. Use PostUp for what DNS and Table did in wg-quick. If the name in Endpoint did not resolve, fix the name or use an address; under systemd a failed start is tried again every 3 seconds.
No permission, or no tunnel device. Run it with sudo. In a container, give it /dev/net/tun and the NET_ADMIN capability.
unknown command for --version or genpsk. Upgrade: sudo apt update && sudo apt upgrade (a downloaded .deb or the tarball: download the new one from the command-line download page). Then fv --version prints the version and fv genpsk prints a pre-shared key. Until you upgrade, read the version with dpkg -s forestvpn-quantum (from the tarball, the version is in its file name) and make a key with head -c 32 /dev/urandom | base64.
The handshake never starts. On both ends, print the public key with sudo sh -c 'fv pubkey < /etc/forestvpn/key' and compare it with the PublicKey in the other file. Check that the listener's ListenPort is open for UDP in its own firewall. Put PersistentKeepalive = 25 on the end behind NAT. If Endpoint is a host name, restart fv after its address changes, or use an address.
The handshake works, the traffic does not. Check that each end's AllowedIPs for the other peer lists the addresses you ping. For a /0 prefix add the route yourself with PostUp, and give FwMark so fv's own UDP is not routed into the tunnel. If a firewall runs on the machine, allow the traffic on the tunnel interface. If forestvpn-quantum-firewall is active, it drops new incoming connections on the tunnel: stop and disable it as under The exit-server unit below.
The MTU is too high. Set MTU = 1416 on both ends, which fits a 1500-byte path. If large packets still stall, lower it in steps on both ends and restart fv run.
The ML-KEM-1024 pair is wrong. Set one end to PostQuantum = require and the other to respond. require is strict: no user traffic flows until the ML-KEM-1024 exchange has finished, and unsupported means the other end cannot do it. If you set a PresharedKey, copy the same one to both files. To change the policy, edit the file and restart: fv set <iface> pq_psk=... does not reach a peer that already exists.
The exit-server unit. Stop and disable both units, forestvpn-quantum@<name> and forestvpn-quantum-firewall, with systemctl disable --now. Then reload your own firewall, for example sudo ufw reload, and restart Docker or libvirt if you use them. Run the tunnel from the packaged fv@<name> unit from now on.
IPv6 forwarding. Switch the forwarding settings off, as step 4 of the boot unit page shows (skip it on a host that runs Docker, libvirt, LXD or Kubernetes, which need forwarding on), or set accept_ra to 2 on the interface that lost its address.
PreDown and PostDown never run. Upgrade fv as under unknown command above, then restart the tunnel (sudo systemctl restart fv@<iface>, or however you started it): an upgrade does not restart a running one. From then on fv run runs PreDown while the interface exists and PostDown after it is gone, and a line that fails is logged while the later ones still run. If a PreUp or PostUp line failed, or you stopped it during PreUp, none runs by design. Until you upgrade, do the cleanup in ExecStopPost= of your own unit, or by hand. Stop fv run with Ctrl+C or systemctl stop, not by closing its terminal; to keep it running after an SSH session ends, start it from the fv@ unit.
PreUp runs after the device exists. PostUp does too. Run anything that must happen before the interface exists before fv run starts, for example in an ExecStartPre= line (sudo systemctl edit fv@<iface> adds one to the packaged unit). Never delete %i in PreUp: it is fv's own new device.
Address replaces the other global addresses. Put every address you want to keep in Address, or add it again with PostUp.
A different socket path. Use fv show.
An ARM machine. Use an x86-64 machine. There is no ARM build.
Obfuscation with a stock peer. Set Obfuscation = off, Padding = off and AdvertisedPorts = off, as in using fv with stock WireGuard.
Still stuck
Run sudo fv diag <iface> (--json for a script) and read the state, layer and because of each peer. On an fv run tunnel it prints no hint to run fv ask; an older fv did, and that assistant needs a ForestVPN account, so ignore it. Two notes are normal: no exit ledger always shows on an fv run tunnel, and no ledger from the far end yet shows until the other fv end has sent its counters (always, with a stock WireGuard peer). Under systemd, read the log with journalctl -u fv@<iface> -b. Never paste a private key or a pre-shared key into a ticket or a forum post. The overview says what fv run does and does not do.