diff --git a/blog/initial-server-setup.html b/blog/initial-server-setup.html index d98b703..32522f1 100644 --- a/blog/initial-server-setup.html +++ b/blog/initial-server-setup.html @@ -40,7 +40,7 @@
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.
-apt update && apt upgrade
+ apt update && apt upgrade
These are packages that are needed for accessing, and controlling the server
@@ -84,14 +84,16 @@ usermod -aG sudo $USERNAME$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
apt install ufw
-ufw deny incoming &&
-ufw allow outgoing &&
-ufw allow 2020 &&
+ufw default deny incoming &&
+ufw default allow outgoing &&
+ufw default allow 2020 &&
ufw enable
If there are any other ports that need to be opened in the future this can be done with:
- ufw allow
+ ufw allow $PORT
or
- sudo ufw allow
+ sudo ufw allow $PORT
+ Then enable it, making sure you've allowed ssh first
+ sudo ufw enable
Set hostname
Setting the name for a server is an important step, but the name doesn't need to be serious