systemctl start firewalld
systemctl restart firewalld.service
firewall-cmd —zone=public —add-port=1556/tcp —permanent
firewall-cmd —zone=public —add-port=13724/tcp —permanent
firewall-cmd —zone=public —add-port=13782/tcp —permanent
firewall-cmd —reload
firewall-cmd —zone=public —list-ports
[root@ntp-server-it-ap02 ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-07-03 18:06:32 CST; 8s ago
Docs: man:firewalld(1)
Main PID: 14748 (firewalld)
CGroup: /system.slice/firewalld.service
└─14748 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Jul 03 18:06:32 ntp-server-it-ap02 systemd[1]: Starting firewalld - dynamic firewall daemon...
Jul 03 18:06:32 ntp-server-it-ap02 systemd[1]: Started firewalld - dynamic firewall daemon.
Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: ICMP type 'beyond-scope' is not supported by the kernel for ipv6.
Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: beyond-scope: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: ICMP type 'failed-policy' is not supported by the kernel for ipv6.
Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: failed-policy: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: ICMP type 'reject-route' is not supported by the kernel for ipv6.
Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: reject-route: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
[root@ntp-server-it-ap02 ~]# rpm -qa|grep firewalld;rpm -qa|grep firewall-config
firewalld-filesystem-0.4.4.4-6.el7.noarch
firewalld-0.4.4.4-6.el7.noarch
firewall-config-0.4.4.4-6.el7.noarch
[root@ntp-server-it-ap02 ~]# rpm -qi firewalld firewall-config
Name : firewalld
Version : 0.4.4.4
Release : 6.el7
Architecture: noarch
Install Date: Thu 21 May 2020 09:10:13 AM CST
Group : Unspecified
Size : 1852322
License : GPLv2+
Signature : RSA/SHA256, Mon 12 Jun 2017 07:17:20 PM CST, Key ID 199e2f91fd431d51
Source RPM : firewalld-0.4.4.4-6.el7.src.rpm
Build Date : Mon 12 Jun 2017 07:12:33 PM CST
Build Host : x86-037.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : http://www.firewalld.org
Summary : A firewall daemon with D-Bus interface providing a dynamic firewall
Description :
firewalld is a firewall service daemon that provides a dynamic customizable
firewall with a D-Bus interface.
Name : firewall-config
Version : 0.4.4.4
Release : 6.el7
Architecture: noarch
Install Date: Thu 21 May 2020 09:11:44 AM CST
Group : Unspecified
Size : 1158110
License : GPLv2+
Signature : RSA/SHA256, Mon 12 Jun 2017 07:17:21 PM CST, Key ID 199e2f91fd431d51
Source RPM : firewalld-0.4.4.4-6.el7.src.rpm
Build Date : Mon 12 Jun 2017 07:12:33 PM CST
Build Host : x86-037.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : http://www.firewalld.org
Summary : Firewall configuration application
Description :
The firewall configuration application provides an configuration interface for
firewalld.
[root@ntp-server-it-ap02 ~]#
[root@ntp-server-it-ap02 ~]# firewall-cmd --permanent --zone=public --add-port=323/udp
Warning: ALREADY_ENABLED: 323:udp
success
[root@ntp-server-it-ap02 ~]# firewall-cmd --reload
success
[root@ntp-server-it-ap02 ~]#
[root@ntp-server-it-ap02 ~]#
[root@ntp-server-it-ap02 ~]# firewall-cmd --zone=public --list-ports
323/udp
[root@ntp-server-it-ap02 ~]#
[root@ntp-server-it-ap02 ~]# firewall-cmd --list-all --permanent
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client ntp
ports: 323/udp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@ntp-server-it-ap02 ~]#
firewall-cmd —permanent —zone=public —remove-port=8530/tcp
上一篇:chronyd
下一篇:nslookup dns 解析