ip – No default gateway in TAP OpenVPN with Kea

We have an OpenVPN server in TAP mode on our server. Wifi routers connect directly to this server; other devices can then connect to them. On our server, we also have a Kea DHCP server that distributes IP addresses to all connected devices (directly or via Wifi). This part works well so far.

We now want these devices to connect to the Internet via the VPN. This part also works – but only if we manually set the default gateway on the devices.

In Kea, we defined the following subnet:

{
"subnet": "10.11.0.0/24",
"Pools": [ { "pool": "10.11.0.10 - 10.11.0.200" } ],
"Option-data": [
            {
                "name": "routers",
                "data": "10.11.0.1"
            },
            {
                "name": "domain-name-servers",
                "data": "8.8.8.8, 9.9.9.9"
            }
     ]
}

From what I understand, the IP address specified in the "routers" option should be used as the default gateway, but this is not the case. We have tested on Android and Windows devices and none of them has defined default gateway (nor Wifi routers). However, the IP addresses are correctly distributed and the DNS servers provided in the "Domain Names" option are set correctly. Once we have manually set the default gateway, the end devices can access the Internet without any problem.

Just in case we had to change anything, here is also the OpenVPN server configuration:

Local 1.2.3.4
port 443
proto tcp
dev tap3
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server gateway
customer to customer
Keepalive 10 120
tls-auth ta.key 0
AES-256-CBC figure
compress lz4-v2
press "compress lz4-v2"
user person
group group