From 16dce63ea4027390b152e7064b8b4e6bf1a18518 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 1 Sep 2025 02:16:40 +0200 Subject: Fix wireguard_gateway role being slow The pihole lookup DNS queries when the VPN connection is up was slow. One of the culprits was the quad9 servers were taking long time when using VPN The other issue was the previous routing tables that used to work with the fritzbox (with DHCP) which wasn't fully working was conflicting with the VPN route tables and causing loops and delays. Now most of the VPN queries are working fast but some requests are taking some time, probably due to the VPN trying to check/block ads and malware! Also minor fixing to the pre tasks and documentation --- roles/pihole/defaults/main.yml | 9 ++++++--- roles/pihole/meta/argument_specs.yml | 13 ++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'roles/pihole') diff --git a/roles/pihole/defaults/main.yml b/roles/pihole/defaults/main.yml index 44744d98..7be113a4 100644 --- a/roles/pihole/defaults/main.yml +++ b/roles/pihole/defaults/main.yml @@ -2,9 +2,12 @@ pihole_password: "{{ ('changeme' | hash('sha256') | hash('sha256'))[:64] }}" pihole_totp_secret: "CHANGEME" pihole_dns: - - "9.9.9.9" # Quad9 - - "1.1.1.1" # Cloudflare - - "8.8.8.8" # Google + # Cloudflare + - "1.1.1.1" + - "2606:4700:4700::1111" + # Google + - "8.8.8.8" + - "2001:4860:4860:0:0:0:0:8888" pihole_interface: "{{ ansible_default_ipv4.interface }}" pihole_dns_blocking_enabled: true pihole_dhcp_enabled: false diff --git a/roles/pihole/meta/argument_specs.yml b/roles/pihole/meta/argument_specs.yml index e7cf04e7..9af61251 100644 --- a/roles/pihole/meta/argument_specs.yml +++ b/roles/pihole/meta/argument_specs.yml @@ -15,9 +15,12 @@ argument_specs: description: "The list of DNS servers to use as upstreams" elements: "str" default: - - "9.9.9.9" # Quad9 - - "1.1.1.1" # Cloudflare - - "8.8.8.8" # Google + # Cloudflare + - "1.1.1.1" + - "2606:4700:4700::1111" + # Google + - "8.8.8.8" + - "2001:4860:4860:0:0:0:0:8888" pihole_interface: type: "str" description: "The interface to bind the pi-hole on" @@ -38,9 +41,9 @@ argument_specs: type: "str" description: "The dhcp end address" default: "{{ ansible_default_ipv4.network }}.199" - pihole_dhcp_address: + pihole_dhcp_router: type: "str" - description: "The dhcp server address (local pihole address)" + description: "The dhcp server router (gateway) address" default: "{{ ansible_default_ipv4.address }}" pihole_dhcp_lease_time: type: "int" -- cgit v1.2.3