Now there are still more details that we can dig out
of this uncomplicated firewall.
To show really how complicated firewalls can be,
we can look at our rules within a raw format.
So this is going to show you how IP tables see our rules.
We can also show those rules that have been added since
the last time the firewall was started.
If we get our firewall in a mess,
we can return everything to the default settings using the reset.
So let's go through and take a look at this from our command line
where we can investigate our reporting tools.
We'll show how we can reset our rules and how we can go through and
start gaining more information about our system.
So back working on the glorious command line of our Ubuntu 20.04 system,
we can go through and take a look at ufw and the show command.
We need to show a particular report.
If I look at the raw report,
we're then able to see the raw rules that have been configured.
So firewalling is always going to be complex.
By adding in a manager like ufw in the front of it,
then it makes life just a little bit more simple for us.
But believe me, there is a huge amount of information here.
We can even go through and see it if we page through the information,
so we can see all of the information that we are
tracking on the rules that we have created.
I'm just going to quit out of this now.
We can also use the report type of added,
and then this is looking at the rules that have been
added since the system was started.
So we've got then our port 22 rule from our 10 network and our
port 80 rule from our 192.168.33.11 system.
Rules are automatically stored in memory and written
through to its configuration files,
the configuration files that we're going to find underneath /etc/ufw and
the rules files that we find below this subdirectory.
If ever we feel we have got ourselves in a mess,
we could disable our firewall, so ufw disable.
Another tool though if we're really in a mess,
we can go through and use the reset.
With the reset, we are restoring then the default settings.
It backs up our rules,
so we can see then that puts a data extension onto those rules.
But if I now go through and take a look at my ufw and status,
then we're back to a disabled firewall with no rules.
So we always have this easy to get out and back to the default configuration.
But remember, if you have spent a lot of time working on those rules,
it might be better trying to tune the existing rules
rather than starting all over again.
But there you go, we have completed our look at UFW.
We can remind ourselves a little of what we've looked at by
running through the information that we've seen.
We've gone through looking at creating our host‑based firewalls using ufw.
So mainly, it's going to be our ufw command,
which we can use for adding and deleting rules.
We've seen some of our reporting tools that we can use, so the raw reporting.
We saw the newly‑added rules,
and we've seen that we can also reset through to
defaults if all goes really pear shaped,
but remember, that is a last line of defense.
But that's it, the end of this module, and congratulations.
But a massive congratulations because it's not just the end of this module,
you've reached the end of this course,
so you know a whole heap about securing your Linux systems. That really does deserve a big slap on the back.