<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Iptables on datahacker</title>
		<link>https://datahacker.blog/tags/iptables/</link>
		<description>Recent content in Iptables on datahacker</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Tue, 24 Nov 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://datahacker.blog/tags/iptables/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Chart: iptables Command Matrix</title>
				<link>https://datahacker.blog/reference/networking/firewalls/chart-iptables-command-matrix/</link>
				<pubDate>Tue, 27 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/firewalls/chart-iptables-command-matrix/</guid>
				<description>&lt;p&gt;This matrix summarizes common IPv4 iptables matches and targets. Each syntax cell is a &lt;strong&gt;rule fragment&lt;/strong&gt;, not a complete command. Add the table, chain operation, appropriate match restrictions, and target when assembling a rule.&lt;/p&gt;&#xA;&lt;p&gt;The placement column gives compatible table/chain pairs or explicit restrictions. Example placements are not an exhaustive list of every supported hook. Kernel, backend, and extension availability still apply. In particular, separate table and chain names cannot be freely combined: &lt;code&gt;filter/POSTROUTING&lt;/code&gt; does not exist.&lt;/p&gt;</description>
			</item>
			<item>
				<title>iptables Commands</title>
				<link>https://datahacker.blog/reference/networking/firewalls/iptables-commands/</link>
				<pubDate>Sun, 25 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/firewalls/iptables-commands/</guid>
				<description>&lt;p&gt;The &lt;code&gt;iptables&lt;/code&gt; command manages IPv4 packet-filtering and NAT rules in the Linux kernel. A rule can match addresses, protocols, interfaces, connection state, and other attributes before selecting a target.&lt;/p&gt;&#xA;&lt;p&gt;This reference covers command structure, chain and rule operations, common match extensions, and targets. It uses the traditional iptables table and chain names. &lt;code&gt;iptables -V&lt;/code&gt; identifies whether the installed command uses the legacy or nftables backend; kernel configuration and installed extensions determine which features are available.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Follow the (ip) Rules</title>
				<link>https://datahacker.blog/reference/networking/firewalls/follow-the-ip-rules/</link>
				<pubDate>Sat, 24 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/firewalls/follow-the-ip-rules/</guid>
				<description>&lt;p&gt;Hopefully, you have already read and/or understand these concepts:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/routing/policy-based-routing/&#34;&gt;Policy Based Routing&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/routing/iproute-and-routing-tables/&#34;&gt;iproute and Routing Tables&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://datahacker.blog/reference/networking/routers-routes-subnets-and-netmasks/&#34;&gt;Routers, Routes, Subnets, and Netmasks&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Now, it&amp;rsquo;s time to talk about &lt;em&gt;ip rules&lt;/em&gt;. The Routing Policy Database (RPDB) selects an action, often a lookup in a routing table. The usual IPv4 rules consult &lt;code&gt;local&lt;/code&gt;, &lt;code&gt;main&lt;/code&gt;, and &lt;code&gt;default&lt;/code&gt;. Those lookups choose routes; they do not grant firewall permission to all traffic.&lt;/p&gt;&#xA;&lt;p&gt;Routes and rules added at the command line affect the live kernel state. Save or reapply them through the system&amp;rsquo;s network configuration if they should survive reboot. Firewall-rule persistence is a separate concern; see &lt;a href=&#34;https://datahacker.blog/tutorials/networking/firewalls/persistence-making-iptables-changes-stick/&#34;&gt;Persistence: Making iptables Changes Stick&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Helpful Tips (iptables)</title>
				<link>https://datahacker.blog/reference/networking/firewalls/helpful-tips-iptables/</link>
				<pubDate>Sat, 24 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/firewalls/helpful-tips-iptables/</guid>
				<description>&lt;p&gt;Here are a few helpful tips related to rule and route testing.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span id=&#34;section-1&#34;&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;migration-heading-1&#34;&gt;Changes Take Effect Without a Routine Cache Flush&lt;/h3&gt;&#xA;&lt;p&gt;Successful &lt;code&gt;ip route&lt;/code&gt;, &lt;code&gt;ip rule&lt;/code&gt;, and &lt;code&gt;iptables&lt;/code&gt; changes update the running kernel configuration. A cache flush does not reload those settings from disk. Linux removed the old IPv4 route cache in kernel 3.6; do not use &lt;code&gt;ip route flush cache&lt;/code&gt; as a routine activation step.&lt;/p&gt;&#xA;&lt;p&gt;Inspect the affected rules and routes, then test a new connection while keeping recovery access available. Existing connection-tracking or NAT state can make an established connection behave differently from a new one.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Persistence: Making iptables Changes Stick</title>
				<link>https://datahacker.blog/tutorials/networking/firewalls/persistence-making-iptables-changes-stick/</link>
				<pubDate>Sat, 24 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/firewalls/persistence-making-iptables-changes-stick/</guid>
				<description>&lt;p&gt;One of the challenges of &lt;em&gt;iptables&lt;/em&gt;, routes, and rules (&lt;em&gt;iprules&lt;/em&gt;) is making changes to them permanent. Any changes you make on-the-fly only last until the next system restart. However, there are several ways of making them persist through reboots.&lt;/p&gt;&#xA;&lt;p&gt;Choose one of the methods below to store your changes in user-manageable scripts that are run every time your server is restarted.&lt;/p&gt;&#xA;&lt;div id=&#34;section-1&#34;&gt;&lt;/div&gt;&#xA;&lt;div id=&#34;migration-heading-1&#34;&gt;&lt;/div&gt;&#xA;&lt;h2 id=&#34;method-1-systemd-start-up-process&#34;&gt;Method #1: &lt;em&gt;systemd&lt;/em&gt; Start-Up Process&lt;/h2&gt;&#xA;&lt;p&gt;This method uses two services: one to establish the firewall before normal network configuration, and another to apply routing policy after the interface and source address are ready. The demonstrated network manager is &lt;em&gt;NetworkManager&lt;/em&gt;, with a dependency that requires successful firewall startup. The original example was written on Ubuntu 16.04. This revised design still needs validation on the system where you intend to use it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Testing Your iptables Rules</title>
				<link>https://datahacker.blog/tutorials/networking/firewalls/testing-your-rules-iptables/</link>
				<pubDate>Sat, 24 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/firewalls/testing-your-rules-iptables/</guid>
				<description>&lt;p&gt;It may not be obvious, but you need to test your rules—both routing rules (via &lt;code&gt;ip rule&lt;/code&gt;) and &lt;em&gt;iptables&lt;/em&gt; rules—before you cement them in place.&lt;/p&gt;&#xA;&lt;p&gt;One useful thing about testing rules before making them permanent is that changes made only to the running configuration do not normally survive a reboot. If you make a catastrophic screw-up, restarting the server may get you back to a working configuration—provided nothing saves or reloads those changes at startup.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux Firewall Management Tools Overview</title>
				<link>https://datahacker.blog/reference/networking/linux-netfilter-tools/</link>
				<pubDate>Fri, 23 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/linux-netfilter-tools/</guid>
				<description>&lt;p&gt;Linux provides several tools for different parts of packet handling. &lt;code&gt;route&lt;/code&gt; belongs to the older net-tools package; &lt;code&gt;ip route&lt;/code&gt; and &lt;code&gt;ip rule&lt;/code&gt; belong to iproute2. They configure kernel routing state rather than carrying packets themselves. For policy routing and multiple tables, use &lt;code&gt;ip route&lt;/code&gt; and &lt;code&gt;ip rule&lt;/code&gt;. The older &lt;code&gt;route&lt;/code&gt; display can still be useful when reading a historical example.&lt;/p&gt;&#xA;&lt;p&gt;A route describes how to reach a destination. Policy rules determine which routing table to consult, or return an action such as &lt;code&gt;prohibit&lt;/code&gt;. Netfilter is the kernel framework used for packet filtering, connection tracking, and NAT. &lt;code&gt;iptables&lt;/code&gt; and &lt;code&gt;nft&lt;/code&gt; configure firewall rules within that framework. These tools complement one another; choosing a route does not by itself grant permission to forward traffic.&lt;/p&gt;</description>
			</item>
			<item>
				<title>iptables Protocols</title>
				<link>https://datahacker.blog/reference/networking/firewalls/iptables-protocols/</link>
				<pubDate>Tue, 20 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/firewalls/iptables-protocols/</guid>
				<description>&lt;p&gt;The &lt;code&gt;-p&lt;/code&gt; or &lt;code&gt;--protocol&lt;/code&gt; option selects an IP protocol. TCP and UDP provide transport-layer source and destination ports; protocols such as ICMP use different fields and do not have TCP/UDP port numbers.&lt;/p&gt;&#xA;&lt;p&gt;Protocol-specific matches can be combined with other matches in one rule. Each condition must succeed. The examples below are rule fragments, not complete commands: the table, chain operation, other restrictions, and target belong to the surrounding rule.&lt;/p&gt;&#xA;&lt;p&gt;Ordinary &lt;code&gt;--sport&lt;/code&gt;/&lt;code&gt;--dport&lt;/code&gt; options accept one port or one colon-separated range. A comma-separated list requires &lt;code&gt;-m multiport&lt;/code&gt;; its list has at most 15 slots, with a range counting as two. That limit belongs to &lt;code&gt;multiport&lt;/code&gt;, not to the number of ports covered by an ordinary range. These forms follow &lt;a href=&#34;https://man7.org/linux/man-pages/man8/iptables-extensions.8.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34; title=&#34;Opens in a new tab&#34;&gt;the extension manual&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Bibliography (Networking Articles)</title>
				<link>https://datahacker.blog/reference/networking/bibliography-linux-networking/</link>
				<pubDate>Wed, 14 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/bibliography-linux-networking/</guid>
				<description>&lt;p&gt;These references preserve the sources recorded for the historical networking articles. Dates and editions remain as originally cited. An archive link identifies a preserved copy; it does not establish that the copy is the exact revision consulted on the date shown.&lt;/p&gt;&#xA;&lt;p&gt;Andreasson, Oskar. &lt;em&gt;Iptables Tutorial 1.2.1&lt;/em&gt;. Chapter 6: Traversing of tables and chains. &lt;a href=&#34;https://www.frozentux.net/iptables-tutorial/chunkyhtml/c962.html&#34;&gt;https://www.frozentux.net/iptables-tutorial/chunkyhtml/c962.html&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Andreasson, Oskar. 2006. &lt;em&gt;Iptables Tutorial 1.2.2. &lt;/em&gt;&lt;a href=&#34;http://homes.di.unimi.it/sisop/qemu/iptables-tutorial.pdf&#34;&gt;http://homes.di.unimi.it/sisop/qemu/iptables-tutorial.pdf&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Anicas, Mitchell. 14 August 2015. &lt;em&gt;How To List and Delete Iptables Firewall Rules&lt;/em&gt;. &lt;em&gt;Digital Ocean&lt;/em&gt;, &lt;a href=&#34;https://www.digitalocean.com/community/tutorials/how-to-list-and-delete-iptables-firewall-rules&#34;&gt;https://www.digitalocean.com/community/tutorials/how-to-list-and-delete-iptables-firewall-rules&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Split Gateway Tutorial</title>
				<link>https://datahacker.blog/tutorials/networking/routing/split-gateway-tutorial/</link>
				<pubDate>Wed, 14 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/routing/split-gateway-tutorial/</guid>
				<description>&lt;p&gt;Thinking of creating split routes or split gateways? This article introduces the building blocks of directing different traffic through different gateways, using a simple VPN and direct Internet connection as the intended example.&lt;/p&gt;&#xA;&lt;aside class=&#34;dh-callout dh-callout-important&#34; aria-label=&#34;Important&#34;&gt;&lt;strong class=&#34;dh-callout-label&#34;&gt;Important&lt;/strong&gt;&lt;div&gt;&#xA;&lt;p&gt;&lt;strong&gt;Recovery Guidance&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Changing routes or gateways can disconnect you from your server, even if you&amp;rsquo;re connected through another machine on the same LAN. Before you begin, make sure you have a way to recover that doesn&amp;rsquo;t depend on the network configuration you&amp;rsquo;re changing. That could be a local console, your hosting provider&amp;rsquo;s console, or a separate management connection.&lt;/p&gt;&#xA;&lt;p&gt;Keep a copy of the working configuration and confirm how you would restore it through that independent access. Test the recovery connection before making changes.&lt;/p&gt;&#xA;&lt;p&gt;A reboot may undo changes made only to the running configuration, provided nothing saves or reapplies them at startup. Once you&amp;rsquo;ve made the changes persistent, rebooting can bring the same problem right back. Don&amp;rsquo;t rely on a restart unless you know the startup configuration will restore working connectivity.&lt;/p&gt;&#xA;&lt;/div&gt;&lt;/aside&gt;</description>
			</item>
			<item>
				<title>Gateways</title>
				<link>https://datahacker.blog/reference/networking/routing/gateways/</link>
				<pubDate>Thu, 08 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/routing/gateways/</guid>
				<description>&lt;p&gt;In an IP route, a &lt;em&gt;gateway&lt;/em&gt; is a next-hop router used to reach destinations beyond the directly reachable link. That link can be physical or virtual. This article explains how to recognize gateway routes and distinguish them from local delivery.&lt;/p&gt;&#xA;&lt;p&gt;Analyzing the output of network route inspection tools such as &lt;strong&gt;ip route&lt;/strong&gt;, &lt;strong&gt;route&lt;/strong&gt;, and &lt;strong&gt;netstat&lt;/strong&gt; will allow you to identify network gateways. The details of how to use those tools are discussed in several other articles on this website, including:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Special Routing Use-Case Scenarios (iproute2)</title>
				<link>https://datahacker.blog/tutorials/networking/routing/special-routing-use-cases-iproute2/</link>
				<pubDate>Sat, 20 Jul 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/tutorials/networking/routing/special-routing-use-cases-iproute2/</guid>
				<description>&lt;p&gt;Linux routes can select a path, return a terminal error, or supply a preferred source address for locally generated traffic. These functions are different from firewall filtering and Network Address Translation (NAT).&lt;/p&gt;&#xA;&lt;p&gt;&lt;span id=&#34;section-1&#34;&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;migration-heading-1&#34;&gt;Dropping Packets&lt;/h2&gt;&#xA;&lt;p&gt;A route can reject or discard traffic without specifying an output device. This affects packets whose policy lookup selects that route; an earlier matching policy rule or a more specific route can change the result.&lt;/p&gt;</description>
			</item>
			<item>
				<title>iproute and Routing Tables</title>
				<link>https://datahacker.blog/reference/networking/routing/iproute-and-routing-tables/</link>
				<pubDate>Fri, 19 Jul 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/routing/iproute-and-routing-tables/</guid>
				<description>&lt;p&gt;Routes describe how the kernel reaches destinations. Policy rules decide which routing tables to consult. Together they provide Linux policy routing; iptables is a separate packet-filtering interface, not a third component of the RPDB.&lt;/p&gt;&#xA;&lt;h2 id=&#34;section-1&#34;&gt;Routes&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;ip route&lt;/code&gt; belongs to iproute2 and manages kernel routing tables. The older &lt;code&gt;route&lt;/code&gt; command belongs to net-tools. It can still help when reading historical output, but it does not provide iproute2&amp;rsquo;s policy-table controls.&lt;/p&gt;&#xA;&lt;p&gt;Use &lt;code&gt;ip -4 route show table all&lt;/code&gt; to inspect all IPv4 tables, or name one table explicitly. Modern Linux table identifiers are 32-bit values, not a limit of 256 tables. The reserved identifiers and optional names are explained below.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Policy Based Routing</title>
				<link>https://datahacker.blog/reference/networking/routing/policy-based-routing/</link>
				<pubDate>Fri, 19 Jul 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/routing/policy-based-routing/</guid>
				<description>&lt;p&gt;A routing table describes paths to network destinations. Linux can use several tables, with a Routing Policy Database (RPDB) deciding which table to consult. The policies are expressed as rules; the tables hold the routes.&lt;/p&gt;&#xA;&lt;p&gt;The RPDB provides a way to choose among several routing tables based on traffic attributes. Rules and routes are separate. Several rules can consult the same table, or different rules can consult different tables. This lets you make routing decisions beyond a single destination-based table.&lt;/p&gt;</description>
			</item>
			<item>
				<title>A Brief History of Linux Networking</title>
				<link>https://datahacker.blog/reference/networking/brief-history-of-linux-networking/</link>
				<pubDate>Wed, 17 Jul 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/brief-history-of-linux-networking/</guid>
				<description>&lt;p&gt;Have you ever wondered why Linux network management is so confusing? You need only make a cursory review of the history of Linux networking tools to understand how it got this way.&lt;/p&gt;&#xA;&lt;blockquote&gt;It&#39;s not surprising so many people become confused attempting to comprehend Linux network routing functions, given the manner in which they have evolved. The names of several important commands and processes are nearly identical to others belonging to completely different tool generations.&lt;/blockquote&gt;&#xA;&lt;p&gt;Legacy interfaces can remain familiar while their implementation changes. A command name alone does not establish which kernel interface it uses, and the continuity of names does not mean Linux networking code remained unchanged for twenty years.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Routing and Filtering Network Traffic</title>
				<link>https://datahacker.blog/reference/networking/routing/routing-and-filtering-network-traffic/</link>
				<pubDate>Wed, 17 Jul 2019 00:00:00 +0000</pubDate>
				<guid>https://datahacker.blog/reference/networking/routing/routing-and-filtering-network-traffic/</guid>
				<description>&lt;p&gt;A brief, high-level introduction to Linux routing and packet filtering: what the kernel decides, and which tools configure those decisions.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span id=&#34;section-1&#34;&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;migration-heading-1&#34;&gt;10,000 Foot View&lt;/h2&gt;&#xA;&lt;p&gt;Routing selects how a packet reaches its destination. Packet filtering decides whether a packet is allowed to proceed. Packet modification, including NAT and marking, is another function that can interact with those decisions. These functions work together, but they are not interchangeable layers of one command.&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>
