In general I use two VPNs. Both are selfhosted OpenVPN networks. One to connect into my home network from the outside and one to use insecure wifis at public places. The first one goes into a WLAN with no way out, so I do not want to route all my traffic through this. But, when I connect through my second one from an airport, I want to make sure, that every traffic from every application of my computer is routed through the tunnel. In the beginning I struggled a lot when I tried to remove the default ip route and add a custom one, because then my connection to my vpn server got lost. But then I found a very comfortable way in the openvpn config to handle the routing for me. By simply adding the following line to my client configuration OpenVPN automatically handles my routing without any init or deinit scripts.
In my openvpn log I can now find the done routing
Fri Oct 18 10:49:30 2019 /usr/bin/ip link set dev tun0 up mtu 1500 Fri Oct 18 10:49:30 2019 /usr/bin/ip addr add dev tun0 10.8.0.3/24 broadcast 10.8.0.255 Fri Oct 18 10:49:30 2019 /usr/bin/ip route add HOST/PORT via 192.168.2.1 Fri Oct 18 10:49:30 2019 /usr/bin/ip route add 0.0.0.0/1 via 10.8.0.1 Fri Oct 18 10:49:30 2019 /usr/bin/ip route add 18.104.22.168/1 via 10.8.0.1
It can be easily checked by pinging an known address and running.
sudo tcpdump -n -i tun0
It should appear in the output