Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

ufw

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) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content