Amend some tags within pre/code

master
Nathan Steel 4 years ago
parent b8130c8aa3
commit 5083c03db3

@ -40,7 +40,7 @@
<h2>Update the OS</h2> <h2>Update the OS</h2>
<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>
<pre><code>apt update && apt upgrade</code></pre> <pre><code>apt update &amp;&amp; apt upgrade</code></pre>
<h2>Install essential packages</h2> <h2>Install essential packages</h2>
<p>These are packages that are needed for accessing, and controlling the server</p> <p>These are packages that are needed for accessing, and controlling the server</p>
@ -84,14 +84,16 @@ usermod -aG sudo $USERNAME$</code></pre>
<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 &amp;&amp;
ufw allow outgoing && ufw default allow outgoing &amp;&amp;
ufw allow 2020 && ufw default allow 2020 &amp;&amp;
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>
<pre><code>ufw allow <PORT></code></pre> <pre><code>ufw allow $PORT</code></pre>
<p>or</p> <p>or</p>
<pre><code>sudo ufw allow <PORT></code></pre> <pre><code>sudo ufw allow $PORT</code></pre>
<p>Then enable it, <strong>making sure you've allowed ssh first</strong></p>
<pre><code>sudo ufw enable</code></pre>
<h2>Set hostname</h2> <h2>Set hostname</h2>
<p>Setting the name for a server is an important step, but the name doesn't need to be serious</p> <p>Setting the name for a server is an important step, but the name doesn't need to be serious</p>

Loading…
Cancel
Save