pihole-kubernetes
pihole-kubernetes copied to clipboard
dnsmasq not adding additionalHostsEntries
Hello, Not sure what i'm doing wrong, but pihole deploys successfully, but the following section doesn't seem to work. When i visit pihole, and click on local DNS -> DNS Records, this section is empty
dnsmasq:
# -- Add upstream dns servers. All lines will be added to the pihole dnsmasq configuration
upstreamServers: []
# - server=/foo.bar/192.168.178.10
# - server=/bar.foo/192.168.178.11
# -- Add custom dns entries to override the dns resolution. All lines will be added to the pihole dnsmasq configuration.
customDnsEntries: [
# - address=/foo.bar/192.168.178.10
# - address=/bar.foo/192.168.178.11
]
# -- Dnsmasq reads the /etc/hosts file to resolve ips. You can add additional entries if you like
additionalHostsEntries: [
10.15.15.200 host1.iad
10.15.15.201 host2.iad
10.15.15.202 host3.iad
10.15.15.210 host4.iad
10.15.15.211 host5.iad
10.15.15.15 host6.iad
10.15.15.15 host7.iad
10.15.15.15 host8.iad
]
Would appreciate any assistance please. Thanks,
Im not able to confirm it right now but i think you want to use the customDnsEntries and not additionalHostEntries for adding hosts to local DNS records.
tried giving this a shot as well, but am still not seeing anything in the custom list
customDnsEntries: [
# - address=/foo.bar/192.168.178.10
# - address=/bar.foo/192.168.178.11
address=/host1.iad/10.15.15.200
]
also tried this but this resulted in the following error: Error: failed to parse pihole.values.yml: error converting YAML to JSON: yaml: line 264: did not find expected node content
customDnsEntries: [
# - address=/foo.bar/192.168.178.10
# - address=/bar.foo/192.168.178.11
- address=/host1.iad/10.15.15.200
]
My custom dns look like this:
dnsmasq:
customDnsEntries:
- address=/share.xxx.de/192.168.178.10
- address=/grafana.xxx.de/192.168.178.60
- address=/pihole.xxx.de/192.168.178.252
- address=/openhab.xxx.de/192.168.178.25
- address=/odroid.xxx.de/192.168.178.26
- address=/trac.xxx.de/192.168.178.64
additionalHostsEntries:
- 192.168.178.10 nas.foo.bar nas
- 192.168.178.60 unifi.foo.bar unifi
- 192.168.178.61 home.foo.bar home
Thing is, it works, even when the entries are not shown in the GUI. I do not have a solution for this, but for me it is okay this way.
This is related to #131.
The local DNS records are stored in /etc/pihole/custom.list
and the local CNAME records in /etc/dnsmasq.d/05-pihole-custom-cname.conf
. The first can be saved by the persistent volume. The second ~~unfortunately not~~ fails to write the changes to the config and does not show a proper error message but shows a green success message.
The values of the section dnsmasq
are appended to the dnsmasq configuration. This explains why the custom entries (of @MoJo2600) are working but not showing up in the GUI.
I will test the PR and merge it asap.
Hello,
According my tries the issue continues to exist, but I'm happy to know that the entries should work even if they are not displayed on the GUI :)
What's up on this issue? The PR is opened? Thanks!
This is related to #131.
The local DNS records are stored in
/etc/pihole/custom.list
and the local CNAME records in/etc/dnsmasq.d/05-pihole-custom-cname.conf
. The first can be saved by the persistent volume. The second ~unfortunately not~ fails to write the changes to the config and does not show a proper error message but shows a green success message.The values of the section
dnsmasq
are appended to the dnsmasq configuration. This explains why the custom entries (of @MoJo2600) are working but not showing up in the GUI.
Hey @AlexanderLieret did you ever resolve this? I have same problem as you
This is related to #269.
Since these 2 files have a different format, it would be a nice improvement if the yaml could be improved too.
Instead of writing lines like - address=/my.host/192.168.1.1
perhaps this could be changed to:
- host: my.host
address: 192.168.1.1
Then the formatting can be handled within the template. This would make the values.yaml
a bit more readable too.
Similar story for the custom CNAME entries.