Skip to content

mapi68/dnscrypt-proxy-pihole

Repository files navigation

License: MIT Pi-hole Compatible Raspberry Pi

🛡️ dnscrypt-proxy-pihole

Secure DNS solution for your Raspberry Pi & Pi-hole setup.
Enhanced DNS encryption and privacy with pre-configured settings.

DNSCrypt DoH No Logs

OverviewFeaturesInstallScriptsConfigurationVerificationUninstall

Support on Ko-fi


🔍 Overview

A preconfigured DNSCrypt-proxy package for Raspberry Pi and Pi-hole users that ensures secure, encrypted DNS queries through carefully selected DNSCrypt and DNS-over-HTTPS servers with strict no-logging policies.

📦 Compatibility

Current Version:

⚠️ Legacy Version:


✨ Features

Feature Description Benefit
🔒 DNSCrypt Advanced DNS encryption Protects against DNS surveillance
🌐 DNS-over-HTTPS Modern DNS protocol support Additional security layer
🕵️ Privacy Focus No-log DNS servers only Ensures query privacy
🛡️ DNSSEC Built-in validation Prevents DNS spoofing
Optimized Raspberry Pi tuned Efficient resource usage

🚀 Install

Install with a single command:

curl -sSfL https://raw.githubusercontent.com/mapi68/dnscrypt-proxy-pihole/master/dnscrypt-proxy-pihole-install | bash

📜 Scripts

1. install-latest-dnscrypt-proxy.bash

Downloads and installs the latest dnscrypt-proxy package directly from official Debian repositories.

  • Auto-detects system architecture
  • Downloads latest version from Debian repos
  • Handles all dependencies
  • Multi-architecture support (amd64, arm64, armhf, ...)
curl -sSfL https://raw.githubusercontent.com/mapi68/dnscrypt-proxy-pihole/refs/heads/master/install-latest-dnscrypt-proxy.bash | bash

2. dnscrypt-proxy-pihole.bash

Sets up DNSCrypt-proxy for optimal use with Pi-hole.

  • Configures secure DNS settings
  • Sets up port 53533 for Pi-hole
  • Enables DNSSEC validation
  • Configures no-logging policy
  • Optimizes caching
curl -sSfL https://raw.githubusercontent.com/mapi68/dnscrypt-proxy-pihole/refs/heads/master/dnscrypt-proxy-pihole.bash | bash

Installation Methods

Method Description When to Use
dnscrypt-proxy-pihole-install Installs pre-configured package Quick, automated setup
install-latest-dnscrypt-proxy.bash Installs vanilla dnscrypt-proxy from Debian repos Custom installations
dnscrypt-proxy-pihole.bash Configures dnscrypt-proxy for Pi-hole After manual installation

⚙️ Configuration

Pi-hole Setup

  1. Access the Pi-hole admin interface
  2. Navigate to Settings → DNS
  3. Set Custom DNS: 127.0.0.1#53533
  4. Disable DNSSEC (handled by DNSCrypt)

Pi-hole DNS Configuration

Important Files

File Purpose
/etc/dnscrypt-proxy/dnscrypt-proxy.toml Main configuration
/var/log/dnscrypt-proxy/query.log Query log
/lib/systemd/system/dnscrypt-proxy.service Systemd service

🔐 Verification

Monitor DNS Resolution

tail -f /var/log/dnscrypt-proxy/query.log

Check Service Status

journalctl -f -u dnscrypt-proxy

DNSSEC Validation Tests

Test 1 — Valid domain (should succeed):

dig +dnssec google.com @127.0.0.1 -p 53533

Expected: status: NOERROR — confirms connectivity and successful resolution.

Test 2 — Corrupt signature (should fail):

dig dnssec-failed.org @127.0.0.1 -p 53533

Expected: status: SERVFAIL — confirms active DNSSEC validation is blocking the corrupt signature.

Online Tests

Successful Cloudflare DNSSEC Validation


🗑️ Uninstall

Remove completely with:

sudo apt --purge autoremove dnscrypt-proxy-pihole -y

📄 License

This project is licensed under the MIT License.


☕ Support

If you find this project useful, consider supporting the development:

Support on Ko-fi


Made with ❤️ for the Raspberry Pi community

About

Preconfigured deb package for every Raspberry Pi and Pi-hole to use only best DNSCrypt, DNS-over-HTTPS and No-Log servers

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages