Routing IPv6 to a Subnet Behind an OpenVPN Client: Why the Kernel Route Isn't Enough

Abstract: A kernel route on tun0 only delivers packets to the OpenVPN daemon. To reach a LAN behind a client over IPv6, the server also needs an iroute-ipv6 entry in that client's CCD file.

Created: 2026-11-19 by

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 icmp6 on 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 as MULTI: 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=1 on 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).

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More