OpenVPN DNS data not being sent over

Started by drivera, November 01, 2018, 04:11:20 AM

Previous topic - Next topic
Hi!

I've configured an OpenVPN endpoint to be able to VPN into my home, but have hit a snag: it appears the OpenVPN configuration doesn't send the DNS server IPs that one configures over the wire for the client to consume. The domain setting has the same issue.

I had to manually add the push rules for dhcp-option DNS and dhcp-option DOMAIN to get it working.

Looking through /var/etc/openvpn I can see that the server configuration doesn't include those directives (unless I add them manually, of course).

I'll have a look at the plugin code to see if something jumps out at me as wholly amiss - maybe this can be my first contribution? :D

Cheers!

I'm having the same problem, but adding the dhcp-option DNS and dhcp-option DOMAIN did not resolve the issue.
Any ideas on how to get DNS to my VPN clients?
Seems like it shouldn't be this hard.

Thanks!

Read the original post fully. A workaround is described.

Cheers!

December 09, 2018, 05:39:50 AM #3 Last Edit: December 09, 2018, 05:56:36 PM by tl5k5
I read and applied the rules to the OpenVPN service and it still doesn't work.
What am I missing?


QuoteI had to manually add the push rules for dhcp-option DNS and dhcp-option DOMAIN to get it working.

You'll have to look into the OpenVPN manual to see what those mean ;)

But this can be worked around.

I've tested this with the default GUI config and can confirm that DNS options are being sent over fine when configured via the server configuration.



Note that I had to add the oVPN subnet to an ACL in the unbound DNS to be able to receive lookups.

To force my windows clients to use the DNS I added 
push "block-outside-dns"

to the Advanced field

I put in the push "block-outside-dns" command and all DNS stopped.
Could the floating rule in the attached picture be my issue?