--- title: Checking DNS Availability url: /review/dns-availability-review/ hidden: true build: list: never render: always sitemap: disable: true --- [Compare all DNS policies](/review/vpn-dns-decisions/). Separate technical review for service availability. Routing configuration and VPN operation have their own [guides](/review/vpn-dns-architecture/). This page supplies manual diagnostics and controlled fault exercises, not a polling daemon or automatic failover controller. Linux runtime validation remains pending. ## Define What Is Being Checked A routing lookup answers where Linux would send a packet under the supplied selectors. A VPN lifecycle event describes the client's session. A DNS query tests a particular resolver operation through the currently permitted path. Keep those observations separate in the test record. Use the selected routing guide's existing resolver, variables, and account context. Observe a fresh query and response on the intended interface. Local cache hits and hosts-file results do not demonstrate upstream availability. Check UDP and TCP independently; a request to a local stub need not use the same transport upstream. Record the query, response status, address, interface, source, and timing. A DNS error reply differs from a timeout; a command failure can also mean a local configuration or invocation error. Neither alone proves the VPN is down. Keep the existing path restrictions in place during diagnosis. ## Keep the Outcome Within the Selected Policy | Scenario | If the Selected Service Does Not Respond | | --- | --- | | 1. Application-scoped DNS | Selected applications' upstream lookups fail; ordinary DNS retains its own policy | | 2A. Strict VPN DNS | Fresh upstream lookups fail; no direct provider is authorized | | 2B. Permissive DNS fallback | The current mode remains in force until an explicit approved transition; this guide does not select a trigger | | 3. Dedicated direct DNS | Lookups fail; no substitution of VPN DNS | | 4A/4B. DNS on VPN 1 | Lookups fail; no direct or VPN 2 fallback | An observer may report available, unavailable, or unknown. Before automating any policy transition, separately define which evidence triggers it, how repeated failures and recovery are handled, and what happens when the observer itself fails. No thresholds, scheduler, or production controller are supplied here. ## Controlled DNS-Service Fault The following retained exercise uses [Example 3's direct-DNS setup](/review/vpn-dns-always-direct-commands/). Use a disposable lab host with independent recovery access and the verified `DIRECT_IF`, `DIRECT_DNS`, and test-name values from that guide. Record each successful rule insertion and remove only rules actually installed; do not leave a partial fault active if a command fails. ### Check an Unresponsive DNS Path To simulate loss of the selected provider while retaining the direct route, temporarily drop only its outbound port-53 requests. This is a fault injection, not a claim that the real provider is down: ```bash sudo iptables -w -I OUTPUT 1 -o "$DIRECT_IF" -d "$DIRECT_DNS" -p udp --dport 53 -m comment --comment dns-direct-test-udp -j DROP sudo iptables -w -I OUTPUT 1 -o "$DIRECT_IF" -d "$DIRECT_DNS" -p tcp --dport 53 -m comment --comment dns-direct-test-tcp -j DROP ``` Fresh lookups must time out or fail without switching provider or route. Inspect these rules' counters as well as captures. Remove both exact test rules afterward, even if a test fails: ```bash sudo iptables -w -D OUTPUT -o "$DIRECT_IF" -d "$DIRECT_DNS" -p udp --dport 53 -m comment --comment dns-direct-test-udp -j DROP sudo iptables -w -D OUTPUT -o "$DIRECT_IF" -d "$DIRECT_DNS" -p tcp --dport 53 -m comment --comment dns-direct-test-tcp -j DROP ``` Verify fresh DNS works again and the test rules are absent. Do not clear the entire connection-tracking table or mistake cached answers for an upstream success. All of these runtime checks are currently untested. For 2A or 2B in VPN mode, apply this same two-rule method to that example's `VPN_IF` and `VPN_DNS`. For 4A/4B, use `DNS_VPN_IF` and `DNS_UPSTREAM`. Substitute the same values in insertion and removal commands. These are alternative lab exercises, not extra permissions or rules to leave installed. In 2B, a test timeout alone must not switch the mode. ## Controlled Payload Fault for the Two-VPN Lab Start from [4A or 4B](/review/vpn-dns-separate-vpns-technical/) with its verified variables and protections. Keep recovery access outside both test interfaces. These temporary drops simulate unresponsive payload paths while routes remain present; they do not disconnect the VPN clients or test their reconnect logic. Record successful insertions and remove each owned test rule before proceeding. ```bash sudo iptables -w -I OUTPUT 1 -o "$DNS_VPN_IF" -m comment --comment test-dns-vpn-payload -j DROP ``` Test fresh lookups, inspect the test rule's counters, and confirm no DNS reaches VPN 2 or the direct provider. This models loss of outbound tunnel payload; it is not proof of a real transport outage. Remove the exact rule and confirm recovery: ```bash sudo iptables -w -D OUTPUT -o "$DNS_VPN_IF" -m comment --comment test-dns-vpn-payload -j DROP ``` Then simulate loss of the application tunnel separately: ```bash sudo iptables -w -I OUTPUT 1 -o "$VPN_IF" -m comment --comment test-app-vpn-payload -j DROP ``` DNS through VPN 1 must still work. A fresh reader connection using a known server IP must fail, so the connection test does not depend on a DNS cache. Remove the exact test rule afterward: ```bash sudo iptables -w -D OUTPUT -o "$VPN_IF" -m comment --comment test-app-vpn-payload -j DROP ``` After testing, verify all exact test rules are absent and repeat the baseline routing and service checks. Actual VPN lifecycle faults belong in the [operation guide](/review/vpn-operation-integration/). None of these exercises creates a new permission to change provider or bypass a firewall restriction.