to preface this the current setup works on my iPad with no issue and only works on my android if i route ALL traffic not just dns through the VPN.
that is my problem i want to only route dns through this vpn. i can provide redacted config files and will answer all questions for more info once i know what more is needed.
i am using the official openVPN client and i am on the latest build of android 7.1.2
If you use the configuration that works on your iPad (only route DNS) does the internet work at all on the Android device? If so, which DNS server does it use (just any?). I think there is a setting in the OpenVPN client which DNS to use as fallback - maybe this is your problem?
See OpenVPN client -> Preferences -> DNS Fallback (that one should not be selected).
OK: You want use VPN just for the DNS?
I would set the serverconfig following: (fooDNS=192.168.5.113)
push "route 192.168.5.112 255.255.255.252" push "dhcp-option DNS 192.168.5.113"
But i warn you: "OpenVPN Connect" and "OpenVPN for Android" does not apply the push option for DHCP (idk why.)
You have to do in terminal "setprop net.dns1 192.168.5.113"
If it's any use: these are my configs. I have openVPN running on a secondary pi hanging off the back of my router, and I connect to it fine with the android openVPN client. Only DNS.
I agree, I have it also running perfectly fine on both Linux and Android ("OpenVPN Connect" app) with similar lines like you posted:
push "route 192.168.5.0 255.255.255.0"
push "dhcp-option DNS 192.168.5.113"
This will make the whole 192.168.5.* network available to the connected device (which I something I wanted to have anyways). I think I've also seen it like this in the Wiki article.
It will be much easier for users without in-depth knowledge to route either an entire /8, /16, or /24 network, because everything else behaves differently than you are used to think (as you suggested with the broadcast address, etc.). Routing an entire /24 seems simple. straightforward and by no other means disadvantageous to me.
so the first issue i have is this is a clouds setup due to bandwidth limitations at home. i have a single external v4 and a single external v6 address. my iOS devices work just fine without any issues not matter what route i push and as of right now the route i am pushing is 10.8.0.1
the issue became apparent when i went from using my VPS like a traditional tunnel (all traffic going through) to just wanting DNS to go through it
well no clue how i did it but its working ... actually shouldn't say it that way lol My configs basically had to use my vps IP as both route and DHCP DNS option. I do appreciate all the help here as it did get me to the right answer in the end ... just a little frustrated at times because it was cloud based and not running over a standard 192.168.x.x network