<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>svnscha - rescue</title>
    <subtitle>automating annoying tasks, sharing tips, and embracing less frustration</subtitle>
    <link rel="self" type="application/atom+xml" href="https://svnscha.de/tags/rescue/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://svnscha.de"/>
    <generator uri="https://astro.build/">Astro</generator>
    <updated>2024-10-04T00:00:00+00:00</updated>
    <id>https://svnscha.de/tags/rescue/atom.xml</id>
    <entry xml:lang="en">
        <title>Where's /etc/pve/firewall/cluster.fw in rescue images?</title>
        <published>2024-10-04T00:00:00+00:00</published>
        <updated>2024-10-04T00:00:00+00:00</updated>
        <author>
          <name>Sven Scharmentke</name>
        </author>
        <link rel="alternate" type="text/html" href="https://svnscha.de/posts/proxmox-rescue-firewall-disable/"/>
        <id>https://svnscha.de/posts/proxmox-rescue-firewall-disable/</id>
        <summary type="html">Ah, so you've locked yourself out of your own Proxmox server. Don't worry, happens.</summary>
        <content type="html" xml:base="https://svnscha.de/posts/proxmox-rescue-firewall-disable/">&lt;h2 id=&quot;why-you-ask&quot;&gt;Why, You Ask?&lt;/h2&gt;
&lt;p&gt;If a firewall rule has locked you out of a Proxmox server, you can disable the firewall from a rescue system. Here is the process I used to regain access.&lt;/p&gt;
&lt;h2 id=&quot;step-1-mount-the-proxmox-system&quot;&gt;Step 1: Mount the Proxmox System&lt;/h2&gt;
&lt;p&gt;First, you need to access your Proxmox filesystem. If you're using LVM (Logical Volume Management), this step is pretty straightforward:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;mount&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; /dev/mapper/vg0-root&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; /mnt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With your filesystem mounted, chroot into it:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;chroot&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; /mnt/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now you're inside your system, ready to work some magic.&lt;/p&gt;
&lt;h2 id=&quot;step-2-disabling-the-firewall&quot;&gt;Step 2: Disabling the Firewall&lt;/h2&gt;
&lt;p&gt;The firewall is likely what caused you to get locked out, so we'll need to disable it temporarily. Run the following commands:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; disable&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; pve-firewall&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; mask&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; pve-firewall&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once you've done that, reboot the server. You should now be able to reconnect to your system normally, without the firewall cutting you off.&lt;/p&gt;
&lt;h2 id=&quot;step-3-fix-the-issue-and-restore-the-firewall&quot;&gt;Step 3: Fix the Issue and Restore the Firewall&lt;/h2&gt;
&lt;p&gt;After fixing whatever issue got you locked out, it's time to re-enable the firewall. Run these commands to restore it:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; unmask&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; pve-firewall&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; enable&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; pve-firewall&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; start&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; pve-firewall&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your firewall should now be back up and running, but without the lockout problem.&lt;/p&gt;
&lt;h2 id=&quot;a-note-about-etcpvefirewallclusterfw&quot;&gt;A Note About &lt;code&gt;/etc/pve/firewall/cluster.fw&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;If you're hunting for &lt;code&gt;/etc/pve/firewall/cluster.fw&lt;/code&gt; while in rescue mode, hoping it's a typical file you can modify directly, you're out of luck. This file is part of Proxmox's cluster-wide configuration and is not stored as a regular file on the disk. Instead, it's managed through Proxmox's internal database, which is part of the &lt;a href=&quot;https://pve.proxmox.com/wiki/Proxmox_Cluster_File_System_(pmxcfs)&quot;&gt;Proxmox Cluster File System (pmxcfs)&lt;/a&gt;. As such, it doesn't exist as a standalone file you can access from rescue mode. To modify this configuration, you'll need to regain full access to Proxmox and make changes from within the Proxmox interface or by editing it via the proper tools once you're back online.&lt;/p&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;And there you have it! With your system back up and running, and the firewall behaving, you can get back to managing your Proxmox server. Just be cautious next time you tweak the firewall rules  -  locking yourself out isn't the most fun way to spend your day!&lt;/p&gt;
</content>
    </entry>
</feed>
