firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="172.30.144" service name="ssh" accept'
firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="172.30.1.44" port protocol="tcp" port="80" reject'
firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="80" reject'
개별 설정 적용 파일 //etc/firewalld/zones/public.xml
===========================================
firewall-cmd --permanent --zone=public --remove-service=http
모든 80 차단
firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.1.200" port protocol="tcp" port="80" accept'
추가
============================================================
firewall-cmd --permanent --zone=public --remove-rich-rule='rule family="ipv4" source address="192.168.1.100" port protocol="tcp" port="80" reject'
제거
======================================================
개별적인 설정
/etc/firewalld/services/custom-ssh.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Custom SSH</short>
<description>Custom SSH with additional ports</description>
<port protocol="tcp" port="22"/>
<port protocol="tcp" port="80"/>
<port protocol="tcp" port="443"/>
</service>
==========================================
firewall-cmd --permanent --add-service=custom-ssh