vpn, move mullvad commands to an rc file, more DNS changes.

This commit is contained in:
me committed 2026-11-23 09:32:27 -07:00
1 parent 7676c69ef1
commit eb7554c706
1 file changed
+39 -20
+39 -20
View File
@@ -118,39 +118,58 @@
state: absent
when: ansible_service_mgr == "runit"
- name: Workstation | Software | VPN | Mullvad | DNS Servers
- name: Workstation | Software | VPN | DNS Servers
ansible.builtin.set_fact:
# https://mullvad.net/en/help/dns-over-https-and-dns-over-tls
dns_mullvad_all: "" # DEPRECATED 2026-11-02
# https://docs.quad9.net/services/
dns_quad9_basic: 9.9.9.9 149.112.112.112 # dns.quad9.net
dns_quad9_ecs: 9.9.9.11 149.112.112.11 # dns11.quad9.net, geo-location based servers
dns_quad9_malware: 9.9.9.9 149.112.112.112 # dns.quad9.net
dns_quad9_noblock: 9.9.9.10 149.112.112.10 # dns10.quad9.net
dns_quad9_malware_ecs: 9.9.9.11 149.112.112.11 # dns11.quad9.net, geo-location based servers
# https://adguard-dns.io/en/public-dns.html
dns_adguard_ads: 94.140.14.14 94.140.15.15 # tls://dns.adguard-dns.com
dns_adguard_noblock: 94.140.14.140 94.140.14.141 # tls://unfiltered.adguard-dns.com
dns_adguard_family: 94.140.14.15 94.140.15.16 # tls://family.adguard-dns.com
# https://developers.cloudflare.com/1.1.1.1/ip-addresses/
dns_cloudflare_basic: 1.1.1.1 1.0.0.1
dns_cloudflare_noblock: 1.1.1.1 1.0.0.1
dns_cloudflare_malware: 1.1.1.2 1.0.0.2 # Blocks malware.
dns_cloudflare_family: 1.1.1.3 1.0.0.3 # Blocks malware and adult content.
# https://controld.com/free-dns#quick-setups
dns_controld_basic: 76.76.2.0 76.76.10.0 # p0.freedns.controld.com, DNS only, no blocking.
dns_controld_noblock: 76.76.2.0 76.76.10.0 # p0.freedns.controld.com, DNS only, no blocking.
dns_controld_malware: 76.76.2.1 76.76.10.1 # p1.freedns.controld.com, malware only.
dns_controld_ads: 76.76.2.2 76.76.10.2 # p2.freedns.controld.com, malware and ads.
dns_controld_social: 76.76.2.3 76.76.10.3 # p3.freedns.controld.com, ONLY does social, not ads or anything.
dns_controld_family: 76.76.2.4 76.76.10.4 # family.freedns.controld.com, still allows socials but blocks all else.
dns_controld_family: 76.76.2.4 76.76.10.4 # family.freedns.controld.com, still allows socials but blocks most everything else.
dns_controld_all: "" # 76.76.2.11 is just the bootstrap IP, not a real server, use subdomain: # no-ads-porn-dating-gov-gambling-drugs-malware-typo-social.freedns.controld.com2
- name: Workstation | Software | VPN | Mullvad | PATH | Enable Lockdown
ansible.builtin.shell: "{{ item }}"
loop:
- mullvad lan set allow # This allows Docker to forward ports to localhost!
- mullvad tunnel set ipv6 on
#- mullvad dns set default --block-ads --block-trackers --block-malware --block-gambling --block-adult-content --block-social-media
- mullvad dns set custom {{ dns_controld_all }} {{ dns_controld_family }} {{ dns_adguard_family }} {{ dns_controld_ads }} {{ dns_adguard_ads }} {{ dns_quad9_basic }} {{ dns_controld_basic }} {{ dns_cloudflare_basic }}
- mullvad auto-connect set on
- mullvad lockdown-mode set on
- mullvad beta-program set off
become: true
become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
- name: Workstation | Software | VPN | Mullvad | Settings
ansible.builtin.copy:
dest: "{{ user_user.home }}/.mullvadrc"
content: |
# This file is managed by Ansible.
# env-ansible/tasks/workstation/linux/software/vpn.yml
mullvad lan set allow # This allows Docker to forward ports to localhost!
mullvad tunnel set ipv6 on
# 2026-11-22
# Mullvad closed their DNS servers November 2nd 2026, and mid November
# the internal DNS stopped recognizing my subdomains, so switching from
# Mullvad DNS completely to test out a few other providers.
#mullvad dns set default --block-ads --block-trackers --block-malware --block-gambling --block-adult-content --block-social-media
mullvad dns set custom {{ dns_controld_all }} {{ dns_controld_family }} {{ dns_adguard_family }} {{ dns_cloudflare_family }} # {{ dns_controld_ads }} {{ dns_adguard_ads }} {{ dns_quad9_malware }} {{ dns_controld_malware }} {{ dns_cloudflare_malware }} {{ dns_quad9_noblock }} {{ dns_adguard_noblock }} {{ dns_controld_noblock }} {{ dns_cloudflare_noblock }}
mullvad auto-connect set on
mullvad lockdown-mode set on
mullvad beta-program set off
# Ensure system is connected if network is available.
#mullvad disconnect
#wifi off
#reconnect >/dev/null 2>&1 &
[[ $(whoami) != "root" ]] &&
echo "`date` - Ansible .mullvadrc loaded successfully!"
owner: "{{ user }}"
backup: false
mode: "0755"