DNS alternative

Rating: 
5
Your rating: None Average: 5 (2 votes)

A DNS alternative system with support for encrypted DNS protocols and ad blocklist. A package that combine connman, dnsmasq and DNSCrypt-proxy into one comprehensive DNS system.

REQUIREMENTS:
- for aarch64 phone a CHUM repository should be enabled to install a 64 bits dnsmasq package.

- for armv7hl phone a birdzhang openrepos repository should be enabled to install a 32 bits dnsmasq package. 

Use for SFOS >=4.5. This package requires and installs DNSCrypt-proxy and DNScrypt-proxy blocklist packages as well.

Configuration files:

/etc/dnsmasq.d/dnscrypt-proxy.conf       - enables dnsmasq as DNS server (@127.0.0.1) and redirects requests for external names to dnscrypt-proxy (@127.0.0.53)
/etc/dnsmasq.d/dns-cache.conf            - enables DNS cache for dnsmasq
/etc/systemd/system/connman.service.d/override.conf - disables /etc/resolv.conf management in Connman
/etc/tmpfiles.d/connman_resolv.conf - makes symlink /etc/resolv.conf -> /var/lib/dnsmasq/resolv.conf
edit: it is relinking of /etc/resolv.conf  after a phone reboot
/var/lib/dnsmasq/resolv.conf - sets a DNS server to 127.0.0.1(ln -s /etc/resolv.conf var/lib/dnsmasq/resolv.conf)

/var/lib/dnscrypt-proxy/dnscrypt-proxy.toml.dnsmasq - after renaming to .toml changes IP addres of dnscrypt-proxy server to 127.0.0.53 ( edit dnscrypt-proxy.toml for configuration of dnscrypt-proxy )
/etc/systemd/system/dnscrypt-proxy.service.d/override.conf - override dnscrypt-proxy with config for work with dns-alternative
/var/lib/harbour-dns-alternative/dnscrypt-proxy.toml - config for dnscrypt-proxy service

/var/lib/dnscrypt-proxy/dnscrypt-blocklist-names.txt - list of blocked domains (edit&remove line with domain you want to unblock)

/usr/local/bin/fix_dns_and_restore_to_default.sh

Uninstalling a DNS alternativeDNSCrypt-proxy and DNScrypt-proxy blocklist packages reverts default DNS service as well.

Emergency manual recovery procedure:
rm -f /var/lib/environment/connman/nodnsproxy.conf
rm -f /etc/systemd/system/connman.service.d/override.conf
systemctl stop dnsmasq
systemctl disable dnsmasq
systemctl restart connman

That package should set DNS and /etc/hosts usage for AlienDalvik as well. 

If there are troubles with uninstalling:
touch /etc/resolv.conf
echo '1.1.1.1' > /etc/resolv.conf
and reinstall the package.

A dnsmasq-2.86 from CHUM is broken for armv7hl. Please, install dnsmasq-2.76 from a birdzhang openrepos repository instead. A  'dnsmasq.service' file is installed if missing.

Bear in mind that this package is intendet for advanced users.

Application versions: 
AttachmentSizeDate
File harbour-dns-alternative-0.9-6.noarch.rpm31.58 KB25/02/2023 - 22:13
File harbour-dns-alternative-0.9-8.noarch.rpm32.15 KB01/03/2023 - 19:50
File harbour-dns-alternative-0.9-9.noarch.rpm33.08 KB17/02/2024 - 19:47
Changelog: 

* Sat Feb 17 2024 kan 0.9-9

- refactoring of config files according to dnscrypt-proxy-2.1.5-3 changes

* Wen Mar 01 2023 kan 0.9-8

- relinking /etc/resolv.conf

- adds dnsmasq.service if missing

* Sun Feb 25 2023 kan 0.9-6

- noarch compilation

- change /etc/resolv.conf management

* Tue Feb 21 2023 kan 0.9-5
- add missing requirement: dnscrypt-proxy-blacklist

* Mon Feb 20 2023 kan 0.9-4
- fix run issues

* Sun Feb 19 2023 kan 0.9-3
- fix uninstalling issue due to the missing /etc/resolv.conf

* Sun Feb 19 2023 kan 0.9
- first release to openrepos