When a server can reach a client's VPN address but nothing on the LAN behind that client, the fix is almost never in the kernel routing table alone. A tun-mode OpenVPN server needs a second, internal route — an iroute-ipv6 entry in the client's CCD file — before it knows which connected client owns the remote prefix. The kernel route only hands packets to the OpenVPN process; the iroute tells that process where to send them next.
A tun interface has no usable "via": OpenVPN routes twice
Tun devices are layer-3 tunnels. They carry bare IP packets with no Ethernet header and no MAC addresses, so there is no neighbor layer the kernel could use to pick a specific destination node. On such an interface the gateway field of a route is meaningless: fd00::101:0/112 via fd00::100:3 dev tun0 behaves exactly like fd00::101:0/112 dev tun0. Think of tun as a pipe with two ends, not an Ethernet switch.
Everything the kernel writes into that pipe is read by a single program: the OpenVPN daemon. The daemon keeps its own per-client map. It learns each client's assigned VPN address automatically at connect time — which is why pinging the client's tunnel IP works out of the box — but it knows nothing about prefixes sitting behind a client unless you declare them. Packets for undeclared destinations are dropped, and the drop is logged.
Confirming the diagnosis in two minutes
Two quick checks prove the packet is dying inside the server's OpenVPN process rather than somewhere in the network:
- Run
tcpdump -ni tun0 icmp6on the server. You will see the echo requests arriving on the server's tun0, while nothing appears on the client's tun0 — the packet never leaves the daemon. - Search the server log for
MULTI:lines. A missing internal route shows up asMULTI: no dynamic or static remote --iroute for fd00::101:201.
If you saw nothing on the server's tun0 either, the problem would be upstream (firewall or kernel policy). Seeing packets there but not on the client is the signature of a missing iroute.
Declaring the client's subnet with iroute-ipv6
Point the server at a client-config directory and give each roaming router a file named after its certificate common name:
# /etc/openvpn/server.conf (addition)
client-config-dir /etc/openvpn/ccd
# /etc/openvpn/ccd/laptop-alice (filename = certificate CN)
iroute-ipv6 fd00::101:0/112
route-ipv6 fd00::101:0/112
The two lines do different jobs. iroute-ipv6 teaches OpenVPN's internal map that this client owns the prefix. route-ipv6 installs the matching kernel route into tun0 — with no gateway — when the client connects; you can also add it in the main server config or by hand with ip -6 route add fd00::101:0/112 dev tun0. For an IPv4 LAN behind a client, the equivalent pair is iroute 192.168.4.0 255.255.255.0 plus route 192.168.4.0 255.255.255.0. Reload the server and reconnect the client so the CCD file is read.
Checklist for end-to-end reachability
- Filename matches the CN. The CCD file name must equal the client certificate's common name, case included. With
duplicate-cn(several clients sharing one CN) an iroute cannot be attributed reliably — issue each router its own certificate. - The client must forward. Enable
net.ipv6.conf.all.forwarding=1on the client and allow forwarding between its tun and LAN interfaces in the firewall. - The return path exists. Hosts behind the client must send replies toward it: the client is their default gateway, they hold a static route for the VPN prefix, or the client masquerades (NAT66). Without one of these, requests arrive but replies never come back.
- Both routing layers are in place. A kernel route without an iroute drops packets at the daemon; an iroute without a kernel route means packets never reach the daemon at all.
If you want kernel-only routing
The alternative is switching the VPN to tap (Ethernet) mode. Tap frames carry MAC addresses, so ordinary kernel routes and bridging work and no iroute is needed. The price: broadcast traffic spreads to every client, MTU handling gets fussier, and several mobile OpenVPN apps do not support tap at all. WireGuard makes the same design trade-off as tun — its per-peer AllowedIPs plays exactly the role of an iroute. For most site-to-client setups, staying on tun with a CCD iroute is the simpler and better-supported choice.
Frequently Asked Questions
Why can I ping the client's tunnel address but not its LAN?
The tunnel address is assigned by OpenVPN, so the daemon's internal table already maps it to that client. A subnet behind the client is invisible to that table until you declare it with iroute-ipv6.
Do I need both the kernel route and the iroute?
Yes. The kernel route moves packets from the host stack into the OpenVPN process; the iroute tells the process which client to encrypt them for. Each covers one of the two routing layers.
What must the CCD file be named?
Exactly the common name of the client's certificate, case-sensitive, inside the directory set by client-config-dir. Adding ccd-exclusive makes the server refuse clients that have no CCD file.
Should I keep the gateway in my route on a tun interface?
It is harmless but pointless — the kernel ignores the gateway on a point-to-point L3 device. Write the route as <prefix> dev tun0 so nobody reading it later expects real next-hop behavior.
Does anything need to change on the client?
Nothing about iroute — that is server-side only. The client needs IPv6 forwarding enabled, firewall rules permitting forwarding, and a return path for its LAN hosts (gateway role, static route, or NAT66).