To Set Up a Firewall with UFW on Ubuntu 24.04, follow these steps:
Step 1 : Ensure your system is up-to-date:
Step 2 : If not already installed, install UFW (Uncomplicated Firewall):
Step 3 : Check the status of UFW:
Step 4 : Allow SSH connections:
Step 5 : (Optional) Allow Other Services : allow other services such as HTTP, HTTPS:
Step 6 : Enable UFW to start protecting your system:
Step 7 : Verify that UFW is active and configured as intended:
Congratulations! You have successfully set up a firewall with UFW on Ubuntu 24.04.