Its time we all focus on reducing screen time and being distracted by getting common ad serving platforms blocked from my personal devices. On my laptop I usually have an ad-blocker installed in the browser but for my mobile devices I currently don't use any adblockers. So it will be useful in setting up a DNS level adblocker that I can share with my family and friends as needed.
After doing some research on platforms available I decided to give adguard home a try. given it acts as a DNS server it can be replaced later without any issues later on.
Once the functional aspects are setup properly, I will have time to worry about non functional requirements (security / backup, restore / monitoring / performance / cost efficiency / high availability / etc..)
heres the steps I followed:
- https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04
- https://frankindev.com/2019/11/26/doh-dot-based-on-adguardhome/
- sudo apt get update
- sudo apt get upgrade
- sudo apt install bind9-host (this is auto installed)
- sudo mkdir /etc/adguardhome
- sudo chown sammy:sammy /etc/adguardhome
- wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz
- sudo ./AdGuardHome -s install
- sudo ufw allow <port number for webportal>
- setup via webportal
- sudo apt install software-properties-common
- sudo add-apt-repository ppa:certbot/certbot
- sudo apt update
- sudo apt install certbot
- sudo certbot certonly --manual --preferred-challenges=dns
- go through the steps and setup the certificates
- go to Adguard webportal encryption settings and follow the steps
- Setup android device DNS over HTTPS
- download nebulo app from app store
- add the new server via DNS over TLS or DNS over HTTPS
- go back and refresh dashboard to see if the new client is registered
- Setup OSX device
- Todo
- Setup IOS device
- Todo
- UFW block for regional IP addresses
- https://scottlinux.com/2013/08/30/block-geo-region-list-of-ips-with-ufw-in-linux/
- download the ip list with CIDR format and copy it over to the server
- while read line; do sudo ufw delete allow from $line; done < cdir-list.txt
- while read line; do sudo ufw allow from $line to any port 9003; done < cdir-list.txt
- Take backup of the server
Additional reading material:
- https://medium.com/@nykolas.z/troubleshooting-dns-over-https