I have been having difficulty getting my iOS OpenVPN client to update its DNS settings in response to DNS transactions routed through the VPN on a per-search-domain basis, as dictated by the following in server.conf:
Code: Select all
push "dhcp-option DNS 10.0.3.1"
push "dhcp-option DOMAIN lan"
Code: Select all
# tcpdump 'udp port 53 && host 10.8.0.6'
// client: "who is 'foo.lan'? -> server: 'foo.lan' is 10.0.3.2"
// no requests for anything but *.lan which is what i want
10:18:07.640564 IP dns.lan.domain > 10.8.0.6.54782: 28038*- 1/1/1 A 10.0.3.2 (81)
10:18:08.670509 IP dns.lan.domain > 10.8.0.6.54782: 28038*- 1/1/1 A 10.0.3.2 (81)
Currently the only way to get the iOS client to resolve *and load* "foo.lan" appears to be to route *all* DNS through the VPN tunnel which I am unwilling to do because of the negative effect on performance. I would very much like to fix this since having to use IP addresses instead of domain names for some cases complicates certificate management. It appears that others have had similar difficulties; the one suggestion I've found, concerning the use of "--register-dns" as a command line option when starting the server, appears to be relevant exclusively in regards to Windows clients.
Thank you for any help you might be able to provide concerning how to enable iOS per-search-domain DNS tunneling using OpenVPN.