I have previously used my router's DHCP server but I am moving this to Pi-hole.
I have disabled the DHCP server on my router and enabled Pi-hole.
The DHCP server works fine.
However, when I add static config for my pi, I get the following error:
FTL failed to start due to duplicate dhcp-host IP address 192.168.0.57 at line 3 of /etc/dnsmasq.d/04-pihole-static-dhcp.conf.
This is the only static config set up.
I thought maybe it was because the old .57 is through my old router, so a restart of the pi, but same issue.
https://tricorder.pi-hole.net/bBFXDhG7/
Note: I have removed it from the config when running the above debug as FTL won't work with it. But let me know if you need one with it in.
The issue is that this host is defined in /etc/dnsmasq.d/04-pihole-static-dhcp.conf
and pihole.toml
. Which leads to the doubling.
Pi-hole should have taken care of this during th transition. Did you manually restore 04-pihole-static-dhcp.conf
?
As a workaround, transfer all the settings from 04-pihole-static-dhcp.conf
to Pi-hole and remove the file from /etc/dnsmasq.d
In any case, this should be fixed by Migrate dnsmasq config files by DL6ER · Pull Request #5479 · pi-hole/pi-hole · GitHub in the future.
DL6ER
November 10, 2023, 8:17pm
4
I have seen two Tricorder logs by now that showed /etc/dnsmasq.d/*-pihole-.conf
files with ownership such (e.g. root:root
) that FTL can read (= migrate) the files but then not remove them after migration -> a duplicate is created.
The PR linked by @yubiuser is indeed the best fix.
Otherwise,
pi-hole:development-v6
← pi-hole:new/etc_dnsmasq_d
opened 09:27AM - 05 Nov 23 UTC
# What does this implement/fix?
Add a new config option `misc.etc_dnsmasq_d` … to allow setting whether files in `/etc/dnsmasq.d` are loaded as additional config files for Pi-hole.
This resolves two long standing issues
1. with Pi-hole not being compatible with software that installs custom files with conflicting lines in this directory (e.g.,` lxd`, [example reference](https://discourse.pi-hole.net/t/dns-service-is-not-running-ubuntu-19-10/30157/5?u=dl6er)) as well as
2. improving the coexistence of Pi-hole with an already running `dnsmasq` on the host as - by default - we won't share any config files in the future (no reference needed)
This change also goes hand-in-hand with [a recently discovered issue](https://discourse.pi-hole.net/t/ftl-failed-to-start-due-to-duplicate-cname-at-line-1-of-etc-dnsmasq-d-05-pihole-custom-cname-conf/66087) where the origin of a spurious file inside `/etc/dnsmasq.d/` could not be determined. We have reports of at least a few dozen testers which had no issues with the CNAME migration FTL applies when moving from pre-v6.0 to v6.0 for the first time.
Overall, it took me a day to realize that this is probably really the better default as it finally makes Pi-hole be able run - for the first time - independent from a possibly intentionally installed `dnsmasq` that may be listening only on some interfaces or on another port and, hence, is in no other conflict with Pi-hole on this machine.
It is important to make it crystal clear in the blog post describing the release that this setting should be switched to on for those that have custom files in there. In case they only want to add one or two custom options, they can already do so from the web interface in v6.0 and doesn't even have to create a file, improving user experience:

---
**Related issue or feature (if applicable):** N/A
**Pull request in [docs](https://github.com/pi-hole/docs) with documentation (if applicable):** N/A
---
**By submitting this pull request, I confirm the following:**
1. I have read and understood the [contributors guide](https://docs.pi-hole.net/guides/github/contributing/), as well as this entire template. I understand which branch to base my commits and Pull Requests against.
4. I have commented my proposed changes within the code.
5. I am willing to help maintain this change if there are issues with it later.
6. It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
7. I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
## Checklist:
- [x] The code change is tested and works locally.
- [x] I based my code and PRs against the repositories `developmental` branch.
- [x] I [signed off](https://docs.pi-hole.net/guides/github/how-to-signoff/) all commits. Pi-hole enforces the [DCO](https://docs.pi-hole.net/guides/github/dco/) for all contributions
- [x] I [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) all my commits. Pi-hole requires signatures to verify authorship
- [x] I have read the above and my PR is ready for review.
can also fix the symptoms even if the actual cause is fixed by
pi-hole:development-v6
← pi-hole:new/migrate_dnsmasq_conf
opened 01:59PM - 06 Nov 23 UTC
# What does this implement/fix?
Migrate `dnsmasq` config files originally cre… ated by a Pi-hole version pre-v6.0 from `/etc/dnsmasq.d` into a new directory owned by user/group `pihole`. This ensures they stay available for later debugging, and won't cause when, e.g., the user later decides to install a `dnsmasq` from the repository.
The differences to how it is done before are:
1. The files are moved completely out of the way of any possibly external `dnsmasq` and won't cause conflicts,
2. The files can be moved by the installer even if "something" happens in between and the files are now owned by, e.g., `root` (`pihole-FTL` could then not move/rename them itself).
This PR is meant to be used in combination with https://github.com/pi-hole/FTL/pull/1737
---
**Related issue or feature (if applicable):** N/A
**Pull request in [docs](https://github.com/pi-hole/docs) with documentation (if applicable):** N/A
---
**By submitting this pull request, I confirm the following:**
1. I have read and understood the [contributors guide](https://docs.pi-hole.net/guides/github/contributing/), as well as this entire template. I understand which branch to base my commits and Pull Requests against.
3. I have commented my proposed changes within the code.
4. I am willing to help maintain this change if there are issues with it later.
5. It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
6. I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
## Checklist:
- [x] The code change is tested and works locally.
- [x] I based my code and PRs against the repositories `developmental` branch.
- [x] I [signed off](https://docs.pi-hole.net/guides/github/how-to-signoff/) all commits. Pi-hole enforces the [DCO](https://docs.pi-hole.net/guides/github/dco/) for all contributions
- [x] I [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) all my commits. Pi-hole requires signatures to verify authorship
- [x] I have read the above and my PR is ready for review.
combined with
pi-hole:development-v6
← pi-hole:new/migrate_dnsmasq_conf
opened 02:30PM - 06 Nov 23 UTC
# What does this implement/fix?
Read config files from new location after the… y have been migrated to after https://github.com/pi-hole/pi-hole/pull/5479 - this branch is meant to be used in combination with the core PR.
This also removes FTL trying to rename the imported files as they are already in a good location.
---
**Related issue or feature (if applicable):** N/A
**Pull request in [docs](https://github.com/pi-hole/docs) with documentation (if applicable):** N/A
---
**By submitting this pull request, I confirm the following:**
1. I have read and understood the [contributors guide](https://docs.pi-hole.net/guides/github/contributing/), as well as this entire template. I understand which branch to base my commits and Pull Requests against.
2. I have commented my proposed changes within the code.
3. I am willing to help maintain this change if there are issues with it later.
4. It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
5. I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
## Checklist:
- [x] The code change is tested and works locally.
- [x] I based my code and PRs against the repositories `developmental` branch.
- [x] I [signed off](https://docs.pi-hole.net/guides/github/how-to-signoff/) all commits. Pi-hole enforces the [DCO](https://docs.pi-hole.net/guides/github/dco/) for all contributions
- [x] I [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) all my commits. Pi-hole requires signatures to verify authorship
- [x] I have read the above and my PR is ready for review.