From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment

Firewalls and SSH security introduction

- Welcome to module three, Firewalls and SSH Security. I introduced to you yet another layer of defense, the firewall. Firewalls are used to permit or deny traffic to and from a computer or network. Generally, Linux systems have most, if not all, inbound ports closed. This makes them inherently secure. However, to get access to a system via SSH or FTP or otherwise, a port needs to be opened. The firewall can be instrumental in opening ports, closing ports, and filtering out unwanted traffic. This module consists of five lessons. First, it's the introduction to firewall security. In this lesson, we'll briefly discuss what a firewall is. We'll talk about the different types of Linux-based firewalls that you should be familiar with, and we'll explain the meaning behind the zero trust mindsets. We'll get into UFW. In this lesson, we demonstrate how to use the uncomplicated firewall. It's easy to use and install, but remember, when there is ease of use, there is usually a tradeoff in terms of security. After that, it's firewalld. In this lesson, we cover how to use firewalld, a more functional frontend firewall tool that offers more security. Then it's NFtables. Here we demonstrate how to use the most powerful firewalling tool in Linux today, NFtables and the NFT command. If you need to secure a network or a server, NFtables and the NFT command is the way to go. And finally, we'll get into securing SSH. So, changing gears a bit, this lesson shows how to harden a secure shell server. We do this by using keys and locking down the SSHD_config file. We'll tie in SSH security to firewalling as we progress through the module. While the firewall should not be your only layer of defense, it's a very important one. There's a ton of work to do, so let's get to it.

Contents