Skip to content
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

Export DNS_FQDN_REQUIRED and DNS_BOGUS_PRIV to setupVars.conf during installation #4327

Merged
merged 1 commit into from Sep 13, 2021
Merged

Export DNS_FQDN_REQUIRED and DNS_BOGUS_PRIV to setupVars.conf during installation #4327

merged 1 commit into from Sep 13, 2021

Conversation

yubiuser
Copy link
Member

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes, and have included unit tests where possible.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)

Please make sure you Sign Off all commits. Pi-hole enforces the DCO.


What does this PR aim to accomplish?:
On a fresh installation there is a mismatch between the options "Never formward non-FQDN" and "Never forward reverse lookups for private IP ranges" which are apparently enabled on the web interface but the resp. options (domain-needed and bogus-priv) are missing in the 01-pihole.conf dnsmasq config file.

Although the options are set in the template of 01-pihole.conf located in the local repo clone, they are going to be removed at the end of the installation script because it calls

ProcessDNSSettings() {

from webpage.sh. The options would have been re-added by the script but only if DNS_FQDN_REQUIRED and DNS_BOGUS_PRIV are true. But they are not, because they have not been exported to setupVars.conf in the install scripts

echo "PIHOLE_INTERFACE=${PIHOLE_INTERFACE}"
echo "IPV4_ADDRESS=${IPV4_ADDRESS}"
echo "IPV6_ADDRESS=${IPV6_ADDRESS}"
echo "PIHOLE_DNS_1=${PIHOLE_DNS_1}"
echo "PIHOLE_DNS_2=${PIHOLE_DNS_2}"
echo "QUERY_LOGGING=${QUERY_LOGGING}"
echo "INSTALL_WEB_SERVER=${INSTALL_WEB_SERVER}"
echo "INSTALL_WEB_INTERFACE=${INSTALL_WEB_INTERFACE}"
echo "LIGHTTPD_ENABLED=${LIGHTTPD_ENABLED}"
echo "CACHE_SIZE=${CACHE_SIZE}"
}>> "${setupVars}"
chmod 644 "${setupVars}"


For more information see here: pi-hole/web#1873 (comment)


I see two solutions to this:

  1. Add DNS_FQDN_REQUIRED and DNS_BOGUS_PRIV to setupVars.conf
  2. Don't tick the boxes in the web interface by default and remove the options from 01-pihole.conf template

How does this PR accomplish the above?:
Implements solution 1.
Exports DNS_FQDN_REQUIRED and DNS_BOGUS_PRIV to setupVars.conf during installation

What documentation changes (if any) are needed to support this PR?:
A detailed list of any necessary changes


  • You must follow the template instructions. Failure to do so will result in your pull request being closed.
  • Please respect that Pi-hole is developed by volunteers, who can only reply in their spare time.

…installation

Signed-off-by: Christian König <ckoenig@posteo.de>
@DL6ER
Copy link
Member

DL6ER commented Sep 13, 2021

It is interesting that nobody found this long-standing bug before. Thanks for the fix!

@DL6ER DL6ER merged commit 2131a1f into pi-hole:development Sep 13, 2021
@yubiuser yubiuser deleted the export_nfqdn_bogus branch September 13, 2021 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants