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.
Configuring UFW - Linux Tutorial
From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment
Configuring UFW
- Let's go ahead and continue with our lab that we're working on in ufw. This is lab 22, and we're going to start with the heading, create inbound rules. Once again, I'm working on an Ubuntu system, so let's go to Ubuntu now. And here we are. So first, the problem is nobody can connect to the server. The firewall is working so well that no one can do any connections to it. Chances are you're going to want to be able to connect to it in some manner. And let's give ssh as the example. Let's say that my client's system needs to ssh into the server. Maybe to do some work with files, or databases, or who knows what. To do that, we need to allow ssh on the firewall. To do that, we need to set up a rule. And the rules are really easy with ufw. We're going to type ufw allow, and you could just do ssh, you could do it by the service name if you want to, or we could do it by port number. And so if we do 22/tcp, that would be the equivalent, or you could pick another port number if you're…
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)