Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openvpn_custom_dns option does not work #166

Closed
oliver opened this issue Sep 12, 2021 · 1 comment · Fixed by #202 or #175
Closed

openvpn_custom_dns option does not work #166

oliver opened this issue Sep 12, 2021 · 1 comment · Fixed by #202 or #175
Labels

Comments

@oliver
Copy link

oliver commented Sep 12, 2021

The openvpn_custom_dns option which is described in the README file does not actually work. Even if I set openvpn_custom_dns to a list of servers and also set openvpn_set_dns to true, my custom DNS server is not pushed to the clients.

I think the problem is that templates/server.conf.j2 uses the openvpn_dns_servers variable (in https://github.com/kyl191/ansible-role-openvpn/blob/master/templates/server.conf.j2#L64) rather than using the values from openvpn_custom_dns.

I see two solutions:

  • document the current behavior, which in my understanding is this:

    • openvpn_dns_servers is the list of DNS servers to use
    • openvpn_custom_dns is a bool value that must be set to true to actually use the entries from openvpn_dns_servers (rather than the Google/Cloudflare servers)
    • openvpn_set_dns must be set to true as well to use the values from openvpn_dns_servers
  • simplify the current behavior: remove openvpn_custom_dns from code and documentation, and use only openvpn_dns_servers

This was linked to pull requests Dec 24, 2024
@kyl191
Copy link
Owner

kyl191 commented Dec 24, 2024

Apologies - #175 fixed this by dropping openvpn_dns_servers for the openvpn_custom_dns list.

@kyl191 kyl191 closed this as completed Dec 24, 2024
@kyl191 kyl191 added the bug label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants