OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: drivera on November 01, 2018, 04:11:20 am

Title: OpenVPN DNS data not being sent over
Post by: drivera on November 01, 2018, 04:11:20 am
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!
Title: Re: OpenVPN DNS data not being sent over
Post by: tl5k5 on December 09, 2018, 12:07:15 am
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!
Title: Re: OpenVPN DNS data not being sent over
Post by: drivera on December 09, 2018, 12:17:46 am
Read the original post fully. A workaround is described.

Cheers!
Title: Re: OpenVPN DNS data not being sent over
Post by: tl5k5 on December 09, 2018, 05:39:50 am
I read and applied the rules to the OpenVPN service and it still doesn't work.
What am I missing?

Title: Re: OpenVPN DNS data not being sent over
Post by: drivera on December 09, 2018, 08:05:11 pm
Quote
I 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.
Title: Re: OpenVPN DNS data not being sent over
Post by: miruoy on December 10, 2018, 10:29:30 am
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.

(https://i.imgur.com/Qq9q7wz.png)

Note that I had to add the oVPN subnet to an ACL in the unbound DNS to be able to receive lookups.
Title: Re: OpenVPN DNS data not being sent over
Post by: fabio on December 10, 2018, 04:37:57 pm
To force my windows clients to use the DNS I added 
Code: [Select]
push "block-outside-dns"
to the Advanced field
Title: Re: OpenVPN DNS data not being sent over
Post by: tl5k5 on December 10, 2018, 07:08:11 pm
I put in the
Code: [Select]
push "block-outside-dns" command and all DNS stopped.
Could the floating rule in the attached picture be my issue?