Firewall Linux
Introduction
This is an article about the Linux firewall; read about the Windows firewall here
Basics
Let us look at firewalld from
CentOS
To check the status, run
firewall-cmd --state
running
To check the settings, run
firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: enp0s3 enp0s8
sources:
services: dhcpv6-client http https ssh
ports: XXXX/tcp XXYY/tcp YYYY/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
Check whether a service (for example ntp) is present in the active zone
sudo firewall-cmd --get-services | grep ntp
Article author: Andrei Olegovich