A simple firewall with UFW
Allow SSH and web traffic and block the rest on Ubuntu.
UFW is Ubuntu's easy firewall. Allow SSH before enabling it, or you'll lock yourself out.
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
ufw status verboseTo allow a port only from your own IP address:
ufw allow from 198.51.100.7 to any port 22 proto tcpIDX Panel also has a firewall that filters traffic before it reaches the server. You can use either or both.
Locked out? Open the console in IDX Panel and run ufw disable.