If it's not installed:
sudo apt install ufwsudo ufw allow 22/tcp (if you're using the standard ssh port)
sudo ufw allow 80/tcp (if you're using standard http)
sudo ufw enable
yes
use /tcp when it's a tcp port, /udp when it's a udp port.
If it's not installed:
sudo apt install ufwsudo ufw allow 22/tcp (if you're using the standard ssh port)
sudo ufw allow 80/tcp (if you're using standard http)
sudo ufw enable
yes
use /tcp when it's a tcp port, /udp when it's a udp port.