ufw,

How to install UFW on Amazon Linux 2

Dec 10, 2021 · 1 min read · Post a comment
How to install UFW on Amazon Linux 2

Maybe you will raise a question is it worth installing ufw on Amazon Linux? Some say that it’s enough to use the instance security groups but if you need some extra security on a server level, for instance, ufw offers additional protection to prevent flood traffic or DDoS attack by setting connection limits regarding ports, IPs, packets. So if you are familiar with ufw I’m going to show you how to install it on amazon linux 2.

Prerequisites

  • Amazon Linux 2
  • sudo user

Install UFW on Amazon Linux 2

Step 1. Update the Amazon Linux 2 system packages:

sudo yum update

Step 2. Install and enable epel repository on Amazon Linux 2:

sudo amazon-linux-extras install epel

Step 3. Now install ufw:

yum install --enablerepo="epel" ufw

Step 4. To check the version and installation as well run:

ufw --version

Output:

ufw 0.35
Copyright 2008-2015 Canonical Ltd.

Step 5. If the installation is fine you can enable it:

sudo ufw enable

Step 6. Check the status with:

sudo ufw status

Conclusion

In some of the next topics, I’m gonna cover how can you protect your instance from flood traffic or DDoS attacks with ufw. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on telegram.