Formulir Kontak

Nama

Email *

Pesan *

Cari Blog Ini

Hetzner Firewall

How to Use UFW for Simple Firewall Management

Introduction

A firewall is a network security system that monitors and controls incoming and outgoing network traffic. It acts as a barrier between a trusted internal network and untrusted external networks, such as the Internet. Firewalls are essential for protecting your network from unauthorized access, viruses, and other security threats.

What is UFW?

UFW (Uncomplicated Firewall) is a user-friendly command-line tool for managing firewall rules on Linux systems. It provides a simple way to create, modify, and delete firewall rules, making it ideal for users with limited Linux experience.

Installing UFW

To install UFW on your Linux system, open a terminal window and type the following command:

```bash sudo apt-get update sudo apt-get install ufw ```

Enabling UFW

After installing UFW, you need to enable it to start protecting your network. To do this, type the following command:

```bash sudo ufw enable ```

Creating Firewall Rules

UFW provides a simple syntax for creating firewall rules. To allow traffic on a specific port, use the following command:

```bash sudo ufw allow ```

For example, to allow SSH traffic on port 22, type:

```bash sudo ufw allow 22 ```

Blocking Traffic

To block traffic on a specific port, use the following command:

```bash sudo ufw deny ```

For example, to block HTTP traffic on port 80, type:

```bash sudo ufw deny 80 ```

Deleting Firewall Rules

To delete a firewall rule, use the following command:

```bash sudo ufw delete ```

To view the list of firewall rules, type:

```bash sudo ufw status ```

Conclusion

UFW is a powerful and easy-to-use firewall management tool for Linux systems. By following the steps outlined in this guide, you can quickly and effectively secure your network from unauthorized access and other security threats.


Komentar