Skip to content

[FEAT] How to not set DNS at all, a.k.a. PEERDNS=none? #382

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

Closed
1 task done
pmorch opened this issue Mar 7, 2025 · 5 comments
Closed
1 task done

[FEAT] How to not set DNS at all, a.k.a. PEERDNS=none? #382

pmorch opened this issue Mar 7, 2025 · 5 comments
Labels
enhancement New feature or request no-issue-activity

Comments

@pmorch
Copy link

pmorch commented Mar 7, 2025

Is this a new feature request?

  • I have searched the existing issues

Wanted change

I'd like a way to configure docker-wireguard, so the config files it creates don't set DNS at all.

Reason for change

I want remote access to my home lab and there are only two IP addresses in there - I don't want to change the client's DNS configuration (which is already complicated).

Proposed code change

I think I achieved this with this diff to the template in the config:

diff -u config/templates/peer.conf.orig  config/templates/peer.conf
--- config/templates/peer.conf.orig	2025-03-08 00:34:14.941119201 +0100
+++ config/templates/peer.conf	2025-03-07 23:36:30.654444001 +0100
@@ -3,7 +3,7 @@
 Address = ${CLIENT_IP}
 PrivateKey = $(cat /config/${PEER_ID}/privatekey-${PEER_ID})
 ListenPort = 51820
-DNS = ${PEERDNS}
+# DNS = ${PEERDNS}
 
 [Peer]
 PublicKey = $(cat /config/server/publickey-server)

(Or I could've just removed the line entirely).

It seems to work. Could it be documented? If we don't want to bother, feel free to just close this issue. I think I would've found it by searching for issues like this one 🙂.

Ideally this could be acheived with PEERDNS=none, but I couldn't see how that could easily be achieved with root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run.

@pmorch pmorch added the enhancement New feature or request label Mar 7, 2025
Copy link

github-actions bot commented Mar 7, 2025

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@LinuxServer-CI
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@iddings
Copy link

iddings commented Apr 28, 2025

I would love to see this as well, currently I have to manually modify configs after generation

@aptalca
Copy link
Member

aptalca commented Apr 28, 2025

You can modify the template and remove the line

@aptalca aptalca closed this as completed Apr 28, 2025
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Apr 28, 2025
@LinuxServer-CI
Copy link
Contributor

This issue is locked due to inactivity

@linuxserver linuxserver locked as resolved and limited conversation to collaborators May 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request no-issue-activity
Projects
Archived in project
Development

No branches or pull requests

4 participants