📜  ufw show rules - Shell-Bash (1)

📅  最后修改于: 2023-12-03 14:48:08.920000             🧑  作者: Mango

Introduction to 'ufw show rules' command

The ufw show rules command is a powerful tool for inspecting and displaying the current firewall rules managed by the Uncomplicated Firewall (UFW) utility in a Linux system. The UFW is a front-end command-line tool used to manage iptables firewall rules.

Usage

To use the ufw show rules command, simply open a terminal and type the following:

ufw show rules

By executing this command, you will receive information about the active firewall rules configured on your system.

Output

The output of the ufw show rules command will be in a structured and human-readable format, providing details about the current firewall rules. The returned information typically includes the rule number, source/destination IP addresses, port numbers, and allowed/denied actions.

Here is an example of the expected output:

Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere                  
80/tcp                     ALLOW       Anywhere                  
443/tcp                    ALLOW       Anywhere                  
22/tcp (v6)                ALLOW       Anywhere (v6)             
80/tcp (v6)                ALLOW       Anywhere (v6)             
443/tcp (v6)               ALLOW       Anywhere (v6)

In this example, the firewall is currently active, and rules are defined to allow incoming connections on ports 22, 80, and 443 for both IPv4 and IPv6 addresses.