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

Feature/new client file configuration section with custom dns config #376

Conversation

nwaldispuehl
Copy link

Adds a new clientConfig configuration section for client file configuration. The first two items in the new section are:

  • clientconfig-dns-servers: Allows to override the DNS servers to be written into the downloadable wg-quick client configuration file.
  • clientconfig-dns-search-domain: Allows to override the DNS search domain to be written into the downloadable wg-quick client configuration file.

DNS configuration according to: https://manpages.debian.org/unstable/wireguard-tools/wg-quick.8.en.html

DNS — a comma-separated list of IP (v4 or v6) addresses to be set as the interface's DNS servers, or non-IP hostnames to be set as the interface's DNS search domains. May be specified multiple times. Upon bringing the interface up, this runs resolvconf -a tun.INTERFACE -m 0 -x and upon bringing it down, this runs resolvconf -d tun.INTERFACE. If these particular invocations of resolvconf(8) are undesirable, the PostUp and PostDown keys below may be used instead.


Sample wg-access-server configuration file extract:

...
clientConfig:
  dnsServers:
    - 10.10.20.80
    - 9.9.9.9
    - 2001:4860:4860::8888
  dnsSearchDomain: mydomain.com

...

Sample matching client configuration file content:

[Interface]
...
DNS = 10.10.20.80, 9.9.9.9, 2001:4860:4860::8888, mydomain.com
...

If left empty, the default values of the server are written into the client config file field.

nwaldispuehl and others added 3 commits May 8, 2023 17:53
The first two items in the new section are:
- `clientconfig-dns-servers`: Allows to override the DNS servers to be written into the downloadable wg-quick client configuration file.
- `clientconfig-dns-search-domain`: Allows to override the DNS search domain to be written into the downloadable wg-quick client configuration file.
The `clientConfigDnsSearchDomain` was not shown in the config file if DNS was disabled and no `clientConfigDnsServers` were defined.
@nwaldispuehl nwaldispuehl added the enhancement New feature or request label May 8, 2023
@nwaldispuehl nwaldispuehl self-assigned this May 8, 2023
@nwaldispuehl nwaldispuehl requested a review from a team as a code owner May 8, 2023 16:04
@mergeable
Copy link

mergeable bot commented May 8, 2023

Thanks for creating a pull request! A maintainer will review your changes shortly. Please don't be discouraged if it takes a while.

@nwaldispuehl nwaldispuehl linked an issue May 8, 2023 that may be closed by this pull request
Copy link
Member

@GoliathLabs GoliathLabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :)

Would it also be possible to add those flags to the helm charts? https://github.com/freifunkMUC/wg-access-server-chart

@nwaldispuehl
Copy link
Author

Yes, we can add the new flags to the helm charts; I will create an issue for it.

I propose to wait with doing a new version here until we merged all pending features from our fork.

@nwaldispuehl nwaldispuehl merged commit 45a872b into freifunkMUC:master May 11, 2023
@nwaldispuehl nwaldispuehl deleted the feature/new-client-file-configuration-section-with-custom-dns-config branch May 18, 2023 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to set custom DNS server
2 participants