<p>Even with a fresh install of Debian from the latest ISO, there may be some updates you're missing, and it's a good idea to have these, especially in case they're security updates.</p>
<p>Even with a fresh install of Debian from the latest ISO, there may be some updates you're missing, and it's a good idea to have these, especially in case they're security updates.</p>
<p>We'll install ufw, deny access inwards to all ports, but allow our server to access any ports outwards. We will then manually allow inwards traffic to the SSH port we set, in this case 2020</p>
<p>We'll install ufw, deny access inwards to all ports, but allow our server to access any ports outwards. We will then manually allow inwards traffic to the SSH port we set, in this case 2020</p>
<pre><code>apt install ufw</code></pre>
<pre><code>apt install ufw</code></pre>
<pre><code>ufw deny incoming &&
<pre><code>ufw default deny incoming &&
ufw allow outgoing &&
ufw default allow outgoing &&
ufw allow 2020 &&
ufw default allow 2020 &&
ufw enable</code></pre>
ufw enable</code></pre>
<p>If there are any other ports that need to be opened in the future this can be done with:</p>
<p>If there are any other ports that need to be opened in the future this can be done with:</p>