OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • OpenVPN DNS data not being sent over
« previous next »
  • Print
Pages: [1]

Author Topic: OpenVPN DNS data not being sent over  (Read 3374 times)

drivera

  • Jr. Member
  • **
  • Posts: 81
  • Karma: 0
    • View Profile
OpenVPN DNS data not being sent over
« 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!
Logged

tl5k5

  • Newbie
  • *
  • Posts: 43
  • Karma: 0
    • View Profile
Re: OpenVPN DNS data not being sent over
« Reply #1 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!
Logged

drivera

  • Jr. Member
  • **
  • Posts: 81
  • Karma: 0
    • View Profile
Re: OpenVPN DNS data not being sent over
« Reply #2 on: December 09, 2018, 12:17:46 am »
Read the original post fully. A workaround is described.

Cheers!
Logged

tl5k5

  • Newbie
  • *
  • Posts: 43
  • Karma: 0
    • View Profile
Re: OpenVPN DNS data not being sent over
« Reply #3 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?

« Last Edit: December 09, 2018, 05:56:36 pm by tl5k5 »
Logged

drivera

  • Jr. Member
  • **
  • Posts: 81
  • Karma: 0
    • View Profile
Re: OpenVPN DNS data not being sent over
« Reply #4 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.
Logged

miruoy

  • Newbie
  • *
  • Posts: 31
  • Karma: 2
    • View Profile
Re: OpenVPN DNS data not being sent over
« Reply #5 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.



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

fabio

  • Newbie
  • *
  • Posts: 46
  • Karma: 2
    • View Profile
Re: OpenVPN DNS data not being sent over
« Reply #6 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
Logged

tl5k5

  • Newbie
  • *
  • Posts: 43
  • Karma: 0
    • View Profile
Re: OpenVPN DNS data not being sent over
« Reply #7 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?
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • OpenVPN DNS data not being sent over
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2