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

    1. [root@ntp-server-it-ap02 ~]# systemctl status firewalld.service
    2. firewalld.service - firewalld - dynamic firewall daemon
    3. Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
    4. Active: active (running) since Fri 2020-07-03 18:06:32 CST; 8s ago
    5. Docs: man:firewalld(1)
    6. Main PID: 14748 (firewalld)
    7. CGroup: /system.slice/firewalld.service
    8. └─14748 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
    9. Jul 03 18:06:32 ntp-server-it-ap02 systemd[1]: Starting firewalld - dynamic firewall daemon...
    10. Jul 03 18:06:32 ntp-server-it-ap02 systemd[1]: Started firewalld - dynamic firewall daemon.
    11. Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: ICMP type 'beyond-scope' is not supported by the kernel for ipv6.
    12. Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: beyond-scope: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
    13. Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: ICMP type 'failed-policy' is not supported by the kernel for ipv6.
    14. Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: failed-policy: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
    15. Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: ICMP type 'reject-route' is not supported by the kernel for ipv6.
    16. Jul 03 18:06:33 ntp-server-it-ap02 firewalld[14748]: WARNING: reject-route: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
    17. [root@ntp-server-it-ap02 ~]# rpm -qa|grep firewalld;rpm -qa|grep firewall-config
    18. firewalld-filesystem-0.4.4.4-6.el7.noarch
    19. firewalld-0.4.4.4-6.el7.noarch
    20. firewall-config-0.4.4.4-6.el7.noarch
    21. [root@ntp-server-it-ap02 ~]# rpm -qi firewalld firewall-config
    22. Name : firewalld
    23. Version : 0.4.4.4
    24. Release : 6.el7
    25. Architecture: noarch
    26. Install Date: Thu 21 May 2020 09:10:13 AM CST
    27. Group : Unspecified
    28. Size : 1852322
    29. License : GPLv2+
    30. Signature : RSA/SHA256, Mon 12 Jun 2017 07:17:20 PM CST, Key ID 199e2f91fd431d51
    31. Source RPM : firewalld-0.4.4.4-6.el7.src.rpm
    32. Build Date : Mon 12 Jun 2017 07:12:33 PM CST
    33. Build Host : x86-037.build.eng.bos.redhat.com
    34. Relocations : (not relocatable)
    35. Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
    36. Vendor : Red Hat, Inc.
    37. URL : http://www.firewalld.org
    38. Summary : A firewall daemon with D-Bus interface providing a dynamic firewall
    39. Description :
    40. firewalld is a firewall service daemon that provides a dynamic customizable
    41. firewall with a D-Bus interface.
    42. Name : firewall-config
    43. Version : 0.4.4.4
    44. Release : 6.el7
    45. Architecture: noarch
    46. Install Date: Thu 21 May 2020 09:11:44 AM CST
    47. Group : Unspecified
    48. Size : 1158110
    49. License : GPLv2+
    50. Signature : RSA/SHA256, Mon 12 Jun 2017 07:17:21 PM CST, Key ID 199e2f91fd431d51
    51. Source RPM : firewalld-0.4.4.4-6.el7.src.rpm
    52. Build Date : Mon 12 Jun 2017 07:12:33 PM CST
    53. Build Host : x86-037.build.eng.bos.redhat.com
    54. Relocations : (not relocatable)
    55. Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
    56. Vendor : Red Hat, Inc.
    57. URL : http://www.firewalld.org
    58. Summary : Firewall configuration application
    59. Description :
    60. The firewall configuration application provides an configuration interface for
    61. firewalld.
    62. [root@ntp-server-it-ap02 ~]#
    63. [root@ntp-server-it-ap02 ~]# firewall-cmd --permanent --zone=public --add-port=323/udp
    64. Warning: ALREADY_ENABLED: 323:udp
    65. success
    66. [root@ntp-server-it-ap02 ~]# firewall-cmd --reload
    67. success
    68. [root@ntp-server-it-ap02 ~]#
    69. [root@ntp-server-it-ap02 ~]#
    70. [root@ntp-server-it-ap02 ~]# firewall-cmd --zone=public --list-ports
    71. 323/udp
    72. [root@ntp-server-it-ap02 ~]#
    1. [root@ntp-server-it-ap02 ~]# firewall-cmd --list-all --permanent
    2. public
    3. target: default
    4. icmp-block-inversion: no
    5. interfaces:
    6. sources:
    7. services: ssh dhcpv6-client ntp
    8. ports: 323/udp
    9. protocols:
    10. masquerade: no
    11. forward-ports:
    12. source-ports:
    13. icmp-blocks:
    14. rich rules:
    15. [root@ntp-server-it-ap02 ~]#

    firewall-cmd —permanent —zone=public —remove-port=8530/tcp