<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>VPN and DNS Policies on datahacker</title>
		<link>https://datahacker.blog/reference/networking/vpn-dns-policies/</link>
		<description>Recent content in VPN and DNS Policies on datahacker</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<atom:link href="https://datahacker.blog/reference/networking/vpn-dns-policies/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Implement the Advanced VPN and DNS Controls on Ubuntu 24.04</title>
				<link>https://datahacker.blog/reference/networking/vpn-dns-policies/ubuntu-24-04-implementation/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/vpn-dns-policies/ubuntu-24-04-implementation/</guid>
				<description>&lt;p&gt;This is the shared implementation walkthrough for the advanced split-gateway guides. Choose one use case and one address-family profile, then follow the same preparation, installation and operating sequence. The &lt;a href=&#34;../ubuntu-24-04-reference-host/&#34;&gt;Ubuntu reference&lt;/a&gt; explains the platform choices; the individual guides explain the policy and its failure behavior.&lt;/p&gt;&#xA;&lt;p&gt;The supplied controller and preparation tools have offline tests. &lt;strong&gt;These Linux instructions have not been executed or accepted on a real host.&lt;/strong&gt; Start with an isolated Ubuntu Server 24.04 LTS amd64 machine and an independent console. Initial installation and rollback deliberately hold that machine&amp;rsquo;s IP traffic. That maintenance hold is separate from ordinary operation, where DNS, payload and address-family failures affect only their approved scopes.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ubuntu 24.04 Reference Host for Advanced VPN Controls</title>
				<link>https://datahacker.blog/reference/networking/vpn-dns-policies/ubuntu-24-04-reference-host/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/vpn-dns-policies/ubuntu-24-04-reference-host/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;../automated-openvpn-controls/&#34;&gt;Advanced IPv4&lt;/a&gt; · &lt;a href=&#34;../advanced-openvpn-ipv6/&#34;&gt;Advanced with IPv6&lt;/a&gt; · &lt;a href=&#34;../&#34;&gt;Simple policies&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Use &lt;strong&gt;Ubuntu Server 24.04 LTS (Noble), amd64&lt;/strong&gt;, as the reference operating system for both advanced guide sets. The reference is a dedicated local-workload host with one routing namespace and separate application/resolver contexts. A clean virtual machine with an independent console is a convenient starting point for the eventual isolated lab. This choice makes the ownership of routes, services and recovery state easier to follow; it does not limit the six routing use cases to virtual machines.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Application Routing Foundation</title>
				<link>https://datahacker.blog/reference/networking/vpn-dns-policies/application-routing-foundation/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/vpn-dns-policies/application-routing-foundation/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;All six DNS walkthroughs start with the same application route. This foundation selects the newsgroup reader&amp;rsquo;s account, marks its packets and directs them into an existing VPN. The independent account guards remain in place if classification or routing fails.&lt;/p&gt;&#xA;&lt;aside class=&#34;dh-callout dh-callout-note&#34; aria-label=&#34;Note&#34;&gt;&lt;strong class=&#34;dh-callout-label&#34;&gt;Note&lt;/strong&gt;&lt;div&gt;&#xA;The commands have been reviewed against the references and checked for Bash syntax. They have not been run on Linux. This is the shared prerequisite for the six alternatives, not another DNS configuration to combine with them.&#xA;&lt;/div&gt;&lt;/aside&gt;&#xA;&lt;h2 id=&#34;walkthrough-shell&#34;&gt;Open the Walkthrough Shell&lt;/h2&gt;&#xA;&lt;p&gt;From your ordinary administrator account, open a root login shell first:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Checking DNS Availability</title>
				<link>https://datahacker.blog/reference/networking/vpn-dns-policies/dns-availability/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/vpn-dns-policies/dns-availability/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A route can exist while a DNS service is not answering. Routing configuration and VPN operation have their own &lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/routing-tools-and-scope/&#34;&gt;guides&lt;/a&gt;. This page supplies manual diagnostics and controlled fault exercises, not a polling daemon or automatic failover controller. Linux runtime validation remains pending.&lt;/p&gt;&#xA;&lt;h2 id=&#34;define-what-is-being-checked&#34;&gt;Define What Is Being Checked&lt;/h2&gt;&#xA;&lt;p&gt;A routing lookup answers where Linux would send a packet under the supplied selectors. A VPN lifecycle event describes the client&amp;rsquo;s session. A DNS query tests a particular resolver operation through the currently permitted path. Keep those observations separate in the test record.&lt;/p&gt;</description>
			</item>
			<item>
				<title>DNS Follows VPN Applications</title>
				<link>https://datahacker.blog/tutorials/networking/vpn-dns/dns-for-vpn-applications/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/vpn-dns/dns-for-vpn-applications/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;You may want your newsgroup reader to use a VPN while your other applications keep using the direct Internet connection. But what about the reader&amp;rsquo;s DNS requests? If those requests use the host&amp;rsquo;s ordinary resolver, they may take a different path from the connection that follows.&lt;/p&gt;&#xA;&lt;p&gt;In this example, the reader uses the VPN provider&amp;rsquo;s DNS through the VPN. Other applications keep their normal DNS configuration. The reader&amp;rsquo;s DNS and application connections must stay on the VPN path; neither is allowed to fall back to the direct connection.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Keep DNS on a Dedicated Direct Route</title>
				<link>https://datahacker.blog/tutorials/networking/vpn-dns/dedicated-direct-dns/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/vpn-dns/dedicated-direct-dns/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Using a VPN does not necessarily mean that you want to use its DNS service. You may already have a DNS provider you prefer, and you may want to keep using that provider regardless of whether an application connects through the VPN or directly to the Internet.&lt;/p&gt;&#xA;&lt;p&gt;For example, your newsgroup reader uses the VPN, while your web browser uses the direct connection. In this example, both applications use your designated DNS provider over the direct connection. Connecting or disconnecting the VPN does not change that choice.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Observing OpenVPN Reconnects with NetworkManager</title>
				<link>https://datahacker.blog/reference/networking/vpn-dns-policies/openvpn-networkmanager-reconnects/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/vpn-dns-policies/openvpn-networkmanager-reconnects/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This guide follows the lifecycle state of one OpenVPN connection managed by NetworkManager. The &lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;DNS routing policies&lt;/a&gt; remain centered on &lt;em&gt;iproute2&lt;/em&gt; routes and rules, Netfilter restrictions, and resolver selection. They do not require OpenVPN, this observer, or an availability loop. See the &lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/routing-tools-and-scope/&#34;&gt;three-part architecture&lt;/a&gt;, &lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/vpn-operation/&#34;&gt;VPN operation guide&lt;/a&gt;, and separate &lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/dns-availability/&#34;&gt;DNS availability guide&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;keep-three-questions-separate&#34;&gt;Keep Three Questions Separate&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Question&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Evidence&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Where is DNS permitted to go?&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Routing rules/tables and firewall policy&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Is the OpenVPN session reconnecting?&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Client lifecycle events associated with that connection&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Can the selected DNS service answer now?&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;A separate DNS availability check&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;A client event does not install or weaken routing policy. A DNS failure is not proof that OpenVPN is reconnecting. An observer losing its own event stream means &lt;strong&gt;unknown&lt;/strong&gt;, not permission to use a less private route.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Prefer VPN DNS, with a Designated Direct Fallback</title>
				<link>https://datahacker.blog/tutorials/networking/vpn-dns/vpn-dns-with-direct-fallback/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/vpn-dns/vpn-dns-with-direct-fallback/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The previous example takes a strict approach: upstream DNS requests use the VPN, and if the VPN is unavailable, those requests fail. That may be exactly what you want when keeping DNS off the direct Internet connection is more important than keeping name resolution available.&lt;/p&gt;&#xA;&lt;p&gt;But you may prefer a more permissive approach. For example, you already have a designated DNS provider that you want to use for your normal Internet connection. When the VPN is working, you want to use the VPN provider&amp;rsquo;s DNS instead. If the VPN fails, you want DNS to return to your designated provider over the direct connection.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Routing All DNS Requests Through the VPN</title>
				<link>https://datahacker.blog/tutorials/networking/vpn-dns/all-dns-through-vpn/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/vpn-dns/all-dns-through-vpn/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;There are situations where you may want some of your Internet traffic to use a VPN, while other traffic uses your ordinary Internet connection. But what about DNS? You may want all of your DNS requests to go through the VPN, regardless of which route the application uses afterward.&lt;/p&gt;&#xA;&lt;p&gt;For example, you might use a VPN for your newsgroup reader while keeping your web browser on the direct Internet connection. In this example, both applications send their DNS requests through the VPN. The browser&amp;rsquo;s connection to the website still uses the direct route.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Routing Tools and Scope</title>
				<link>https://datahacker.blog/reference/networking/vpn-dns-policies/routing-tools-and-scope/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/vpn-dns-policies/routing-tools-and-scope/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Routing policy, VPN operation, and availability monitoring have different jobs. This introduction explains the tools before you choose one of the six configurations. The walkthroughs remain untested on Linux.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-to-use-this-series&#34;&gt;How to Use This Series&lt;/h2&gt;&#xA;&lt;p&gt;There are three levels to this material. Start with the tools and what they do, then choose a configuration that fits your needs.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Understand the tools.&lt;/strong&gt; This introduction explains routing, firewall rules, DNS selection, and their Linux and Ubuntu context.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Build a basic configuration.&lt;/strong&gt; Choose a scenario from the &lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;VPN/DNS decision table&lt;/a&gt;. Each basic walkthrough links to the shared application-routing foundation and contains the prerequisites, commands, explanations, and checks needed for that one policy.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Add advanced behavior later.&lt;/strong&gt; Automatic provider switching, event handlers, and availability loops belong in later tutorials. They remain separate from these basic configurations.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;All six basic walkthroughs now combine their explanations and technical steps. Their source and local page checks are complete, but Linux validation remains pending; advanced automation is deferred.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Separate VPNs, Using an Independent DNS Provider</title>
				<link>https://datahacker.blog/tutorials/networking/vpn-dns/vpn1-independent-dns-apps-on-vpn2/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/vpn-dns/vpn1-independent-dns-apps-on-vpn2/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;You may want to choose your own DNS provider without sending queries through your direct Internet connection. As in Example 4A, DNS uses &lt;strong&gt;VPN 1&lt;/strong&gt;, your newsgroup reader uses &lt;strong&gt;VPN 2&lt;/strong&gt;, and ordinary application connections remain direct. These are separate paths from the same host, not one VPN inside another.&lt;/p&gt;&#xA;&lt;p&gt;The second variation uses a DNS provider you choose separately, reached through VPN 1. For example, you may prefer a particular resolver regardless of which VPN service carries the connection.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Separate VPNs, Using VPN 1&#39;s DNS</title>
				<link>https://datahacker.blog/tutorials/networking/vpn-dns/vpn1-native-dns-apps-on-vpn2/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/vpn-dns/vpn1-native-dns-apps-on-vpn2/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The earlier examples use one VPN, with different choices about which traffic should use it. But you may want to separate your DNS requests from your application connections while still keeping both off the direct Internet path.&lt;/p&gt;&#xA;&lt;p&gt;For example, you want your newsgroup reader to connect through one VPN, but you want its DNS requests to use another. Your ordinary browser can continue using the direct connection. Its DNS requests would still use the VPN reserved for DNS.&lt;/p&gt;</description>
			</item>
			<item>
				<title>VPN Operation and the Routing Interface</title>
				<link>https://datahacker.blog/reference/networking/vpn-dns-policies/vpn-operation/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/vpn-dns-policies/vpn-operation/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/&#34;&gt;Compare all DNS policies&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The VPN client supplies the connection; routing and DNS policy decide which traffic can use it. This guide explains the operational boundary and what to observe when the connection changes. The &lt;a href=&#34;https://datahacker.blog/reference/networking/vpn-dns-policies/routing-tools-and-scope/&#34;&gt;routing policies&lt;/a&gt; do not depend on a particular VPN client or an availability monitor. No client configuration or Linux runtime test is performed here.&lt;/p&gt;&#xA;&lt;h2 id=&#34;establish-the-connection-independently&#34;&gt;Establish the Connection Independently&lt;/h2&gt;&#xA;&lt;p&gt;Choose and configure the VPN client using its supported connection procedure. Record the client and manager versions, profile identity, authentication method, tunnel interface, local address, any required next hop, and the expected return path. Keep credentials out of review records.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
