December 2018
Beginner
826 pages
22h 54m
English
In your Ubuntu VM, ufw probably won't be enabled by default. We will enable it, but first we're going to add a rule to make sure that we can get back in once the firewall is up:
vagrant@ubuntu1:~$ sudo ufw allow ssh/tcpRule addedRule added (v6)
You can enable it with the following command:
vagrant@ubuntu1:~$ sudo ufw enableCommand may disrupt existing ssh connections. Proceed with operation (y|n)? yFirewall is active and enabled on system startup
We can now see the status of our firewall by using the status verbose option:
vagrant@ubuntu1:~$ sudo ufw status verboseStatus: activeLogging: on (low)Default: deny (incoming), allow (outgoing), disabled (routed)New profiles: skipTo Action From-- ------ ----22/tcp ALLOW IN Anywhere 22/tcp (v6) ...