Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
5.3. Viewing the Current Status and Settings of firewalld
5.3.1. Viewing the Current Status of firewalld Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
The firewall service,
firewalld
, is installed on the system by default. Use the firewalld
CLI interface to check that the service is running.
To see the status of the service:
firewall-cmd --state
~]# firewall-cmd --state
For more information about the service status, use the
systemctl status
sub-command:
Furthermore, it is important to know how
firewalld
is set up and which rules are in force before you try to edit the settings. To display the firewall settings, see Section 5.3.2, “Viewing Current firewalld
Settings”
5.3.2. Viewing Current firewalld Settings Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
5.3.2.1. Viewing Allowed Services using GUI Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
To view the list of services using the graphical firewall-config tool, press the Super key to enter the Activities Overview, type
firewall
, and press Enter. The firewall-config tool appears. You can now view the list of services under the tab.
Alternatively, to start the graphical firewall configuration tool using the command-line, enter the following command:
firewall-config
~]$ firewall-config
The Firewall Configuration window opens. Note that this command can be run as a normal user, but you are prompted for an administrator password occasionally.
Figure 5.2. The Services tab in firewall-config
5.3.2.2. Viewing firewalld Settings using CLI Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
With the CLI client, it is possible to get different views of the current firewall settings. The
--list-all
option shows a complete overview of the firewalld
settings.
firewalld
uses zones to manage the traffic. If a zone is not specified by the --zone
option, the command is effective in the default zone assigned to the active network interface and connection.
To list all the relevant information for the default zone:
Note
To specify the zone for which to display the settings, add the
--zone=zone-name
argument to the firewall-cmd --list-all
command, for example:
To see the settings for particular information, such as services or ports, use a specific option. See the
firewalld
manual pages or get a list of the options using the command help:
For example, to see which services are allowed in the current zone:
firewall-cmd --list-services
~]# firewall-cmd --list-services
ssh dhcpv6-client
Listing the settings for a certain subpart using the CLI tool can sometimes be difficult to interpret. For example, you allow the
SSH
service and firewalld
opens the necessary port (22) for the service. Later, if you list the allowed services, the list shows the SSH
service, but if you list open ports, it does not show any. Therefore, it is recommended to use the --list-all
option to make sure you receive a complete information.