debbie10t wroteIn your openvpn server config file:
push "route inetaddr mask gateway"
route will be added to the client route table on connect and removed on disconnect by openvpn.
Alternatively, you could use an openvpn
up/down script on the client.
In my setup, multiple clients connect to the VPN server and authenticate against the radius which also hands out IP addresses. Traffic to IP addresses currently connected through VPN should be routed to the VPN server, traffic for unconnected clients should be routed elsewhere.
tl;dr: I need the route in the server's route table, not in the client's.