Somehow, I can't use
sudo ufw. The terminal keeps saying:
command not found
Is it even installed on your system?
You can install UFW with
sudo apt install ufw
You can get help with UFw with
You can download UFW directly from the ubuntu software center:
But, above all else, you can set paramenters for UFW using the GUI by installing Firewall Configuration tool from the ubuntu software center.
Assuming the package is installed, it may not be included in the PATH.
You can find the binary location by looking at the list of files installed by running:
dpkg -L ufw
If your platform doesn't have that then you can brute-force search for the binary with this command:
sudo find / -name ufw
You should find it in one of the bin or sbin folders, then run
echo "$PATH" and check if the ufw binary folder is included.
If the folder is not included you'll need to add it to your PATH either temporarily by using this command
export PATH="/usr/sbin:$PATH" (replacing /usr/sbin with your ufw folder), or permanently by adding this to .profile or .bashrc (wherever your config is)