[GH-ISSUE #248] systemd-resolved integration #102

Closed
opened 2026-02-26 04:34:03 +03:00 by kerem · 7 comments
Owner

Originally created by @sh3bang on GitHub (Oct 6, 2022).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/248

Hello,

first of all: DPS is a very helpful Service, thank you very much!

I can understand to replace the /etc/resolv.conf file, it is the most common way to use a different DNS Server. But with systemd-resolved on the Host it isn't recommend. systemd-resolved offer a API to change or add DNS Servers. Therefore i ask to integrate systemd-resolved instead of replacing system files.

Originally created by @sh3bang on GitHub (Oct 6, 2022). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/248 Hello, first of all: DPS is a very helpful Service, thank you very much! I can understand to replace the /etc/resolv.conf file, it is the most common way to use a different DNS Server. But with systemd-resolved on the Host it isn't recommend. systemd-resolved offer a API to change or add DNS Servers. Therefore i ask to integrate systemd-resolved instead of replacing system files.
kerem 2026-02-26 04:34:03 +03:00
  • closed this issue
  • added the
    feature
    label
Author
Owner

@SimJoSt commented on GitHub (Dec 2, 2022):

Duplicate: https://github.com/mageddo/dns-proxy-server/issues/246

<!-- gh-comment-id:1334997709 --> @SimJoSt commented on GitHub (Dec 2, 2022): Duplicate: https://github.com/mageddo/dns-proxy-server/issues/246
Author
Owner

@mageddo commented on GitHub (Feb 23, 2023):

Hey, thank your for the feedback @sh3bang .

I wouldn't know about this systemd-resolved ability to change the DNS servers, I think it would be a nice feature, I will take a look to understand how to use it, probably won't be a problem when running locally but asking myself if it will be possible to use that when DPS is running inside a container.

<!-- gh-comment-id:1441209800 --> @mageddo commented on GitHub (Feb 23, 2023): Hey, thank your for the feedback @sh3bang . I wouldn't know about this systemd-resolved ability to change the DNS servers, I think it would be a nice feature, I will take a look to understand how to use it, probably won't be a problem when running locally but asking myself if it will be possible to use that when DPS is running inside a container.
Author
Owner

@sh3bang commented on GitHub (Feb 23, 2023):

The mistake is to replace /etc/resolv.conf by DPS Container. Keep it as-is and add a custom DNS server (DPS on top of all other in the resolver list), e.g. by adding the container IP to /etc/systemd/resolved.conf
Or just have a look at "adguard"

<!-- gh-comment-id:1441434955 --> @sh3bang commented on GitHub (Feb 23, 2023): The mistake is to replace /etc/resolv.conf by DPS Container. Keep it as-is and add a custom DNS server (DPS on top of all other in the resolver list), e.g. by adding the container IP to /etc/systemd/resolved.conf Or just have a look at "adguard"
Author
Owner

@mageddo commented on GitHub (Feb 25, 2023):

Hey @sh3bang I've made some tests with systemd-resolved and reported them on this thread, when using it correctly docker behavior gets a lot better, but I've noticed that won't to able to automatically configure system-resolved when DPS is running inside a container as I expected because systemd-resolved restart is required.

Do you know any workaround?

<!-- gh-comment-id:1445181309 --> @mageddo commented on GitHub (Feb 25, 2023): Hey @sh3bang I've made some tests with systemd-resolved and reported them [on this thread][1], when using it correctly docker behavior gets a lot better, but I've noticed that won't to able to automatically configure system-resolved when DPS is running inside a container as I expected because systemd-resolved restart is required. Do you know any workaround? [1]: https://github.com/mageddo/dns-proxy-server/issues/244#issuecomment-1445179978
Author
Owner

@mageddo commented on GitHub (Feb 25, 2023):

I consolidated the feature specs at https://github.com/mageddo/dns-proxy-server/issues/321

<!-- gh-comment-id:1445193172 --> @mageddo commented on GitHub (Feb 25, 2023): I consolidated the feature specs at https://github.com/mageddo/dns-proxy-server/issues/321
Author
Owner

@mageddo commented on GitHub (Feb 26, 2023):

The feature is alive at DPS 3.4, please check it out and give me a feedback if possible. See #321 for some instructions of how to use it, I will update the docs later.

I'm using the following command:

$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/systemd/:/host/etc/systemd --network host \
defreitas/dns-proxy-server:3.4.0-beta
<!-- gh-comment-id:1445244085 --> @mageddo commented on GitHub (Feb 26, 2023): The feature is alive at DPS 3.4, please check it out and give me a feedback if possible. See #321 for some instructions of how to use it, I will update the docs later. I'm using the following command: ```bash $ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \ -v /etc/systemd/:/host/etc/systemd --network host \ defreitas/dns-proxy-server:3.4.0-beta ```
Author
Owner

@sh3bang commented on GitHub (Oct 13, 2023):

@mageddo Thanks, DPSis now working fine with systemd-resolved!

<!-- gh-comment-id:1761402641 --> @sh3bang commented on GitHub (Oct 13, 2023): @mageddo Thanks, DPSis now working fine with systemd-resolved!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#102
No description provided.