You'll need to complete this lab on a clean snapshot of your Ubuntu virtual machine. Let's get started:
- Shut down your Ubuntu virtual machine and restore the snapshot to get rid of all of the iptables stuff that you just did. (Or, if you prefer, just start with a fresh virtual machine.)
- When you've restarted the virtual machine, verify that the iptables rules are now gone:
sudo iptables -L
- View the status of ufw. Open port 22/TCP and then enable ufw. Then, view the results:
sudo ufw statussudo ufw allow 22/tcpsudo ufw enablesudo ufw statussudo iptables -Lsudo ip6tables -L
- This time, open port 53 for both TCP and UDP:
sudo ufw allow 53sudo iptables -Lsudo ip6tables -Lsudo ufw status
- cd into the /etc/ufw ...