Updates on setup & firewall

This commit is contained in:
mic0 2025-11-26 18:00:37 +01:00
parent ae032f683e
commit ba46a5e80f
No known key found for this signature in database
GPG Key ID: 8E103C91321755A8
2 changed files with 7 additions and 4 deletions

View File

@ -13,7 +13,8 @@ dnf update -y && dnf upgrade -y
Then install the neccessary packages Then install the neccessary packages
```sh ```sh
dnf install -y epel-release firewalld bind-utils git fail2ban neovim dnf install -y epel-release firewalld bind-utils git
dnf install -y fail2ban neovim
``` ```
`epel-release` is neccessary to get fail2ban and some later dependencies `epel-release` is neccessary to get fail2ban and some later dependencies
@ -78,7 +79,7 @@ usermod -aG wheel admin # Give elevated (sudo) privileges to the user
Switch to `admin` account Switch to `admin` account
```sh ```sh
su -i admin su - admin
``` ```
Create files and paste your public key Create files and paste your public key

View File

@ -48,8 +48,9 @@ sudo firewall-cmd --set-default-zone=public
Then open the relevant ports and reload the firewall Then open the relevant ports and reload the firewall
```sh ```sh
sudo firewall-cmd --permanent --zone=public --add-port=80/tcp sudo firewall-cmd --permanent --zone=public --add-port=22/tcp # SSH
sudo firewall-cmd --permanent --zone=public --add-port=443/tcp sudo firewall-cmd --permanent --zone=public --add-port=80/tcp # HTTP
sudo firewall-cmd --permanent --zone=public --add-port=443/tcp # HTTPS
sudo firewall-cmd --reload sudo firewall-cmd --reload
``` ```
@ -58,6 +59,7 @@ OR
You can also open "services", these are just aliases for port/protocol pairing (aka service=http is equal to port 80/tcp) You can also open "services", these are just aliases for port/protocol pairing (aka service=http is equal to port 80/tcp)
```sh ```sh
sudo firewall-cmd --permanent --zone=public --add-service=ssh
sudo firewall-cmd --permanent --zone=public --add-service=http sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload sudo firewall-cmd --reload