From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Setting up UFW - Linux Tutorial
From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment
Setting up UFW
- Now let's get into the lab for UFW. We're going to split this lab into two sublessons. In this lab we're going to show how to install UFW, enable the UFW service, enable the UFW firewall itself, and create some rules. So, if you look at the screen you'll see I'm working at Lab 22 - UFW, and we'll get to work on that now. It says here I'll be testing on a Debian server as root, but I'm actually going to work on an Ubuntu server. So, last minute change here. So, we'll bring up Ubuntu, and I've booted that up. This is Ubuntu 22.04, and we'll log in as root. And welcome, we are in, awesome. So, by default UFW is installed into Ubuntu, but we can check that just by typing the UFW command. It says error, not enough arguments, so that means it recognizes it. But if you need it you can install it with an apt install ufw. So, for example, if you're using Debian server feel free to do that. The lab will work essentially the same way on both distros. After that, we want to make sure it is…
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
(Locked)
Learning objectives1m 34s
-
(Locked)
Introduction to nftables and the nft command2m 34s
-
(Locked)
nftables setup4m 5s
-
(Locked)
Tables > Chains > Rules2m 31s
-
(Locked)
Building the nftables configuration, part 18m 41s
-
(Locked)
Building the nftables configuration, part 28m 39s
-
Saving and restoring the nftables configurations8m 36s
-
(Locked)
Translating iptables to nftables7m 49s
-
(Locked)
-
-
(Locked)
Learning objectives1m 18s
-
(Locked)
Review of SSH1m 47s
-
(Locked)
Using keys to connect via SSH12m 57s
-
(Locked)
The sshd_config file3m 19s
-
(Locked)
Modifying the default SSH port7m 32s
-
(Locked)
Disabling password-based SSH2m 57s
-
(Locked)
Disabling root login via SSH2m 32s
-
(Locked)
Exclusive SSH groups4m 37s
-
(Locked)
Authentication settings10m 6s
-
(Locked)
Terminating SSH connections, part 17m 45s
-
(Locked)
Terminating SSH connections, part 26m 51s
-
(Locked)