Complete the code to enable the UFW firewall.
sudo ufw [1]Use ufw enable to turn on the firewall.
Complete the code to allow incoming SSH connections using UFW.
sudo ufw [1] sshUse ufw allow ssh to permit SSH traffic through the firewall.
Fix the error in the iptables command to list all rules with line numbers.
sudo iptables -[1] --line-numbersThe correct option to list rules is -L. It shows all rules with optional line numbers.
Fill both blanks to add a rule that drops incoming TCP packets on port 80 using iptables.
sudo iptables -A INPUT -p [1] --dport [2] -j DROP
Use protocol tcp and port 80 to drop HTTP traffic.
Fill all three blanks to create a UFW rule that limits incoming connections on port 22.
sudo ufw [1] [2]/[3]
The command ufw limit 22/tcp limits SSH connections to prevent brute force attacks.
