systemctl start firewalld.service
systemctl enable firewalld.service
systemctl stop firewalld.service
firewall-cmd --state
iptables -nL
firewall-cmd --zone=public --list-ports
firewall-cmd --reload
firewall-cmd --permanent --zone=public --add-port=81/tcp
firewall-cmd --permanent --zone=public --add-port=8080-8083/tcp
firewall-cmd --permanent --zone=public --remove-port=81/tcp
firewall-cmd --permanent --add-rich-rule="rulefamily="ipv4" source address="192.168.142.166" portprotocol="tcp" port="6379" accept"
firewall-cmd--permanent--add-rich-rule="rulefamily="ipv4" source address="192.168.0.233" accept"
firewall-cmd --permanent --remove-rich-rule="rulefamily="ipv4" source address="192.168.1.51" accept"
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.0.0/16" accept"
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="9200" accept"
firewall-cmd --reload
# 将80端口的流量转发至8080
firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8080
# 将80端口的流量转发至192.168.0.1
firewall-cmd --add-forward-port=port=80:proto=tcp:toaddr=192.168.0.1
# 将80端口的流量转发至192.168.0.1的8080端口
firewall-cmd --add-forward-port=port=80:proto=tcp:toaddr=192.168.0.1:toport=8080