Skip to content

Instantly share code, notes, and snippets.

@frizz925
Created October 5, 2022 12:52
Show Gist options
  • Save frizz925/97d88f806f4415da32f5f267d7377f5a to your computer and use it in GitHub Desktop.
Save frizz925/97d88f806f4415da32f5f267d7377f5a to your computer and use it in GitHub Desktop.
Cloud config for setting up DNSCrypt Proxy and Pi-Hole
#cloud-config
users:
- default
- name: dnscrypt-proxy
gecos: DNSCrypt Proxy User
system: true
package_upgrade: true
packages:
- curl
- supervisor
- htop
runcmd:
- systemctl disable --now snapd snapd.socket ssh
- ufw allow domain
- ufw allow bootps
- ufw allow http
- ufw allow https
- ufw enable
- sleep 30 # HACK: Wait 30 seconds for network interfaces to go up
- curl -o /tmp/dnscrypt-proxy.tar.gz -fsSL https://github.com/DNSCrypt/dnscrypt-proxy/releases/download/2.1.2/dnscrypt-proxy-linux_x86_64-2.1.2.tar.gz
- mkdir /tmp/dnscrypt-proxy
- tar -C /tmp/dnscrypt-proxy --strip-components 1 -xzf /tmp/dnscrypt-proxy.tar.gz
- install -o root -g root -m 755 /tmp/dnscrypt-proxy/dnscrypt-proxy /usr/local/bin/dnscrypt-proxy
- supervisorctl reload
- curl -o /tmp/pihole-install.sh -L https://install.pi-hole.net
- bash /tmp/pihole-install.sh --unattended
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment