I noticed a DNS proxy service I saw utilizes openvpn and tunnels supposedly only DNS traffic through the VPN which masks the users of the VPN's geolocation and allows the users system to use their initial connection for all other traffic.
I could see this being very useful for a project I'm working on that utilizes VPN's and the traffic that I would want routed through the tunnel would be dns specifically for certain intranet sites we have.
I have tried thinking of how their setup is working via openvpn, I cannot seem to find information on openvpn's source/destination filtering. What I have found are examples of openvpn administrators filtering client access traffic so that one openvpn client can talk to another openvpn client which is not what I want.
The only way to accomplish this from what I can think of would be if openvpn has a filtering option for administrators where the admin can place in a exclusions IP filter list. For instance if a user queries via DNS for google.ca the openvpn IP exclusions filter will see that google.ca's(I know openvpn is only up to layer3 so a request for google coming in would just be the IP of google that isn't in the exclusions list) IP is not an acceptable IP for trafficing over the tunnel, but if the user wants to talk to myIntranetServer.com, the vpn knows to allow the traffic through the VPN.
When the openvpn server denies google.ca IP traffic through due to google's IP's being not an IP in the list of IP's that's allowed to be trafficed through the VPN, it sends a notification back to the openvpn client for the client OS to make the DNS query instead of openvpn's DNS route.
Since I am not familiar with all the options openvpn provides and cannot seem to find explicit info for this type of setup, what do you guys think of how that service is doing this?
I have found one example that touches a bit on the subject but I'm not familiar with how to specify the traffic: OpenVPN - Client traffic is not entirely routed through VPN