[GH-ISSUE #227] Confused how it is intended to be used, even with the old nsswitch system. #91

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

Originally created by @bayeslearnerold on GitHub (Jun 16, 2021).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/227

What is Happening

When run in docker and using resolve.conf mapping,
it comments out the other dns servers in resolve.conf completely, thus making the host unable to resolve local servers (those neither in dockers, or on the internet).

In other words, running this with resolve.conf mapped from the host:

on the host:
ping container by hostname or servicename. docker . Good!
ping a local server on the lan, ---> not working.
ping an internet server ---> Good!

What is expected

need to implement split dns so that local hosts can still be resolved. But how can this be done if it is run on a docker bridge network, e.g. (authored in a docker-compose file)?

Originally created by @bayeslearnerold on GitHub (Jun 16, 2021). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/227 ### What is Happening When run in docker and using resolve.conf mapping, it comments out the other dns servers in resolve.conf completely, thus making the host unable to resolve local servers (those neither in dockers, or on the internet). In other words, running this with resolve.conf mapped from the host: on the host: ping container by hostname or servicename. docker . Good! ping a local server on the lan, ---> not working. ping an internet server ---> Good! ### What is expected need to implement split dns so that local hosts can still be resolved. But how can this be done if it is run on a docker bridge network, e.g. (authored in a docker-compose file)?
Author
Owner

@mageddo commented on GitHub (Mar 2, 2023):

on the host:
ping container by hostname or servicename. docker . Good!
ping a local server on the lan, ---> not working.
ping an internet server ---> Good!

You need to configure this another local DNS server which was commented out at the /etc/resolv.conf file at DPS remoteDnsServers. See this section

Explanation:

DPS needs to be the unique DNS server configured at /etc/resolv.conf because in my tests if don't, Linux will randomly choose which dns server to use and it will broke the things.

A possible new feature

DPS would comment these servers and automatically configure them as remote servers though, it would be a nice feature, I will take a look at that.

<!-- gh-comment-id:1452204504 --> @mageddo commented on GitHub (Mar 2, 2023): > on the host: > ping container by hostname or servicename. docker . Good! > ping a local server on the lan, ---> not working. > ping an internet server ---> Good! You need to configure this another local DNS server which was commented out at the /etc/resolv.conf file at DPS remoteDnsServers. [See this section][1] **Explanation:** DPS needs to be the unique DNS server configured at /etc/resolv.conf because in my tests if don't, Linux will randomly choose which dns server to use and it will broke the things. **A possible new feature** DPS would comment these servers and automatically configure them as remote servers though, it would be a nice feature, I will take a look at that. [1]: http://mageddo.github.io/dns-proxy-server/latest/en/3-configuration/#json-configuration
Author
Owner

@mageddo commented on GitHub (Mar 2, 2023):

need to implement split dns so that local hosts can still be resolved. But how can this be done if it is run on a docker bridge network, e.g. (authored in a docker-compose file)?

I see, have you tried run DPS on HOST network mode just to check if it works?

<!-- gh-comment-id:1452226757 --> @mageddo commented on GitHub (Mar 2, 2023): > need to implement split dns so that local hosts can still be resolved. But how can this be done if it is run on a docker bridge network, e.g. (authored in a docker-compose file)? I see, have you tried run DPS on HOST network mode just to check if it works?
Author
Owner

@mageddo commented on GitHub (Mar 22, 2023):

Starting from DPS 3.15.1-snapshot it's not necessary to be the only one nameserver configured at resolv.conf , please follow #386 to the feature option to not comment out the existing dns servers.

<!-- gh-comment-id:1478881336 --> @mageddo commented on GitHub (Mar 22, 2023): Starting from DPS `3.15.1-snapshot` it's not necessary to be the only one nameserver configured at resolv.conf , please follow #386 to the feature option to not comment out the existing dns servers.
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#91
No description provided.