Hey there,
So there’s no firewall on your VPS? Here’s a quick set of commands to get ufw
up and running. Make sure to run all commands as the root user.
Install ufw
apt-get install ufw -y
Deny all incoming traffic by default (ufw is currently disabled so no need to worry)
ufw default deny incoming
Allow all outgoing traffic by default
ufw default allow outgoing
Allow SSH, HTTP and HTTPS with the following three commands
ufw allow ssh
ufw allow http
ufw allow https
Then start ufw (it’ll ask to confirm due to your current SSH session; you can accept and reconnect if necessary)
ufw enable
You can optionally check the status
ufw status