-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
[BUG] DNS resolution issues - polluted by DHCP search option #27
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
I did not notice this issue with other linuxserver.io images, e.g. FreshRSS' |
Your issue is your search domain included, but the behavior is the expected behavior. According to the man page, if the query has no dots, the search domain is automatically added. Typically in a home lab setting the search domain would be set to the local domain used on the lan. You have it set to a public domain. |
Why doesn't it happen in other images or binaries, only
I'm not sure what you mean. I believe you refer to this part? Finally, if the hostname does not contain a '.', the root domain is assumed as the local domain name. This refers to populating the search domain list: By default, the search list contains one entry, the local domain name. In my setup this list contains two: the "local domain name" and the one from my DHCP. The former is calculated with the "dot" logic.
For this specific case, when using local DNS server the concept of "local domain" vs "public domain" disappears. Whether the search domain option is set to valid TLD, or a syntetic one, from the perspective of the client - it doesn't matter. Even when I set the domain search to Looks like |
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. |
Is there an existing issue for this?
Current Behavior
curl
resolves domain names for another containers via external DNS.Expected Behavior
curl
resolves domain names for another containers via internal docker networking firstSteps To Reproduce
.example.org
influxdb
influx.example.org
on DNS servercurl http://influxdb
Here's how
/etc/resolv.conf
looks like:The
ping
resolves DNS properly, via internal Docker DNS service, to172.20.0.4
:The
curl
resolves DNS incorrectly, via my LAN DNS service, I believe because before attempting to resolveinfluxdb
it first applies the DHCP search option and adds.example.org
toinfluxdb
, i.e. resolves to myinfluxdb.example.org
address, which is10.0.0.131
(address of my reverse-proxy, port 8086 is not even open there):As a workaround, I can use
influxdb.services_default
hostname (services_default is my compose network):This issue breaks the communication to influxdb, as speedtest-tracker's PHP uses curl libs under the hood.
Environment
CPU architecture
x86-64
Docker creation
Container logs
The text was updated successfully, but these errors were encountered: