I found this on the forum, but I'm not sure how it needs to be set up in my case
I have two VPN interfaces, wireg and novpn. Usually I use wireg. Sometimes I use novpn instead. So I would like to have IP rules to send all DNS queries through wireg interface. And through novpn if this is connected, if possible.
So far I don't have any IP rules set up.
ip rule
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
I use a slightly different approach which uses routing the DNS servers via the VPN, by using a script which on ifup of the interface routes the DNS servers via the VPN.
Maybe not exactly what you are looking for but perhaps give you and idea how to deal with this.
I'm not sure. I don't insist on using IP rules.
How can I check whether the queries are routed through the VPN tunnel and that these queries are not bypassing the VPN tunnel?