<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Firewall on rHomelab</title><link>https://rhomelab.com/tags/firewall/</link><description>Recent content in Firewall on rHomelab</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 19 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://rhomelab.com/tags/firewall/index.xml" rel="self" type="application/rss+xml"/><item><title>Proxmox Firewall: Locking Down Your Homelab at the Datacenter, Node, and VM Level</title><link>https://rhomelab.com/proxmox/proxmox-firewall-setup/</link><pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate><guid>https://rhomelab.com/proxmox/proxmox-firewall-setup/</guid><description>How Proxmox&amp;#39;s built-in firewall actually works across datacenter, node, and VM/container levels, how rule precedence and security groups fit together, and the setup that won&amp;#39;t lock you out of your own host.</description><content:encoded><![CDATA[<p>Proxmox ships with a real, iptables-backed firewall built into the platform, and most homelabs never turn it on. It&rsquo;s not enabled by default at any level, so unless you&rsquo;ve gone looking for it in the UI, there&rsquo;s a good chance your VMs and containers are sitting behind nothing but whatever VLAN segmentation you&rsquo;ve set up, if any. That&rsquo;s often fine. It stops being fine the moment you&rsquo;re running something internet-facing, or you want one VM to be reachable only from your management network and nowhere else, or a compromised guest shouldn&rsquo;t be able to freely talk to everything else on its VLAN just because they share a broadcast domain. This is what the built-in firewall is actually for, and it&rsquo;s worth understanding the shape of it before you flip it on.</p>
<h2 id="what-it-controls-that-vlans-dont">What it controls that VLANs don&rsquo;t</h2>
<p>VLANs and the Proxmox firewall solve adjacent but different problems. A VLAN controls what a device can physically reach on the wire, it&rsquo;s a Layer 2 segmentation tool. The firewall controls which specific ports and protocols are allowed to talk to a given VM or container, regardless of what VLAN it&rsquo;s sitting on. Two VMs on the same VLAN, same broadcast domain, can still have completely different firewall postures, one wide open, one locked down to a single source IP on a single port.</p>
<p>In practice you want both. VLANs for broad segmentation (guest network can&rsquo;t reach management network at all), firewall rules for anything that needs tighter control than &ldquo;same VLAN, so it&rsquo;s reachable.&rdquo; A reverse proxy VM that&rsquo;s supposed to accept HTTPS from the whole internet but SSH from nowhere but your management subnet is exactly the case VLANs alone can&rsquo;t express, and the firewall handles cleanly.</p>
<h2 id="three-levels-and-how-they-stack">Three levels, and how they stack</h2>
<p>The firewall applies at three levels, evaluated in order, and understanding the stacking is the difference between rules that do what you expect and rules that silently don&rsquo;t fire.</p>
<p><strong>Datacenter level.</strong> The broadest scope, cluster-wide (or single-host-wide if you&rsquo;re not clustered) rules and the master on/off switch. Anything you set here applies to every node and every guest, useful for things that should be true everywhere: allow SSH from your management subnet, allow ICMP for pings, default-deny everything else inbound. This is also where you define <strong>Security Groups</strong>, reusable named rule sets you can attach to multiple VMs instead of retyping the same five rules on each one.</p>
<p><strong>Node (host) level.</strong> Rules that apply to the physical Proxmox host itself, not its guests, things like restricting who can reach the web UI on port 8006, or the cluster communication ports if you&rsquo;re running a multi-node setup. This is separate from VM-level rules because the host and its guests have entirely different attack surfaces; a rule protecting the hypervisor&rsquo;s own management interface has nothing to do with what&rsquo;s allowed to reach a VM running on it.</p>
<p><strong>VM/container level.</strong> Per-guest rules, the most common place you&rsquo;ll actually spend time. Each VM and container gets its own firewall tab with its own rule set, enabled independently, so a public-facing web server VM and an internal-only database VM sitting on the same node can have completely different postures.</p>
<p>Rules from all three levels that apply to a given packet are evaluated together, not one level overriding the others outright, so a broad datacenter-level allow and a narrow VM-level allow both matter, and a VM-level deny can block traffic that a datacenter rule would otherwise have allowed. The practical habit that keeps this legible: put the genuinely global stuff (management SSH, ICMP) at the datacenter level, host-protection rules at the node level, and everything guest-specific at the VM level. Resist the urge to solve a single-VM problem with a datacenter-wide rule just because it&rsquo;s convenient in the moment, it gets hard to audit fast once a handful of guests have each grown their own datacenter-level exceptions.</p>
<h2 id="enabling-it-without-locking-yourself-out">Enabling it without locking yourself out</h2>
<p>The firewall is disabled by default at every level specifically so turning it on is a deliberate act, not something that silently starts dropping traffic you didn&rsquo;t expect. That said, &ldquo;deliberate&rdquo; doesn&rsquo;t mean &ldquo;hard to get wrong,&rdquo; and the classic mistake is the same one that bites people on Proxmox networking changes generally: enabling the firewall on a VM or node you&rsquo;re currently connected to, with a default-deny policy, before you&rsquo;ve explicitly allowed the connection you&rsquo;re using.</p>
<p>A few habits that prevent that:</p>
<ul>
<li><strong>Add your explicit allow rules first, enable the firewall second.</strong> Before flipping the enable checkbox on a node or VM, add the SSH/web UI allow rule for your own management subnet. Enabling the firewall with no rules and a default-deny input policy cuts your own access the instant it applies.</li>
<li><strong>Set the default input policy to DROP only after you&rsquo;ve confirmed your allow rules work</strong>, not before. Proxmox&rsquo;s default policy when you first enable the firewall is typically permissive enough not to lock you out immediately, but if you&rsquo;re tightening it, verify each change from a second session before closing the one you&rsquo;re working in.</li>
<li><strong>Keep a second way in open during the change.</strong> Same rule as any Proxmox networking edit, a physical console, IPMI/iDRAC, or a second SSH session you don&rsquo;t close until you&rsquo;ve confirmed the new rules actually work, not just that they applied without an error.</li>
<li><strong>Test node-level and VM-level firewall changes separately.</strong> If both get enabled in the same session and something breaks, you won&rsquo;t know which level did it without backing one out at a time.</li>
</ul>
<h2 id="security-groups-and-ipsets-dont-repeat-yourself-across-guests">Security Groups and IPSets: don&rsquo;t repeat yourself across guests</h2>
<p>Once you&rsquo;ve got more than two or three VMs with firewall rules, retyping the same &ldquo;allow SSH from management subnet&rdquo; rule on every single one becomes its own maintenance problem, change the subnet later and you&rsquo;re editing it in ten places. Security Groups solve this: define the rule set once at the datacenter level, then attach that group to any VM or container that needs it. Update the group, every guest using it picks up the change.</p>
<p>IPSets solve the adjacent problem, named, reusable lists of IP addresses or subnets you can reference from any rule instead of hardcoding an address inline. If your management subnet or your list of trusted remote IPs is something you reference in multiple rules across multiple guests, put it in an IPSet once rather than typing the same CIDR range into five different rule fields, so a future change (new management VLAN, home ISP changes your static IP) is one edit instead of a hunt through every rule that mentions it.</p>
<h2 id="logging-turn-it-on-before-you-need-it">Logging: turn it on before you need it</h2>
<p>Each rule can log matches at a configurable verbosity, and it&rsquo;s worth turning logging on for your deny rules specifically, not everything, while you&rsquo;re first building out a rule set. A default-deny policy with no logging tells you traffic was blocked; it doesn&rsquo;t tell you what traffic, from where, or which rule caught it, which is exactly the information you need when something you expected to work doesn&rsquo;t. Logs land in the node&rsquo;s syslog and are visible from the firewall tab&rsquo;s log view in the UI, no separate log aggregation needed to get useful signal while you&rsquo;re iterating on a new rule set.</p>
<h2 id="performance-a-non-issue-at-homelab-scale">Performance: a non-issue at homelab scale</h2>
<p>The Proxmox firewall is implemented on top of the Linux kernel&rsquo;s netfilter/iptables framework, the same mechanism a standalone Linux firewall would use, not something layered on in userspace. At the traffic volumes and rule-set sizes a homelab actually runs, the overhead isn&rsquo;t something you&rsquo;ll notice or need to plan around. This becomes a real design consideration at large-scale, thousands-of-rules deployments, which is not the situation ninety-nine percent of homelabs will ever be in.</p>
<h2 id="bottom-line">Bottom line</h2>
<p>The Proxmox firewall is a real, capable tool that most homelabs leave switched off simply because nothing forces you to turn it on. It&rsquo;s most useful layered on top of VLAN segmentation rather than instead of it, VLANs decide what can reach a device at all, the firewall decides which specific ports on that device are actually open. Add your own allow rules before enabling a default-deny policy, keep global rules at the datacenter level and guest-specific rules at the VM level, lean on Security Groups and IPSets once you&rsquo;re maintaining rules across more than a couple of guests, and turn logging on for deny rules while you&rsquo;re still building things out. None of it is complicated in isolation, the risk is entirely in enabling a strict policy before you&rsquo;ve confirmed your own access is covered.</p>
]]></content:encoded></item></channel></rss>