firewalld各種設定
ポートの許可
firewall-cmd --zone=public --add-port=PortNO/tcp --permanent
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --zone=public --add-service=https --permanent
許可ポートの削除
firewall-cmd --remove-port=PortNO/tcp
任意のIPアドレスの制限
【RHEL9】firewalldで特定のIPアドレスからの通信を完全に拒否(ドロップ)する方法 | TRAINING GROUNDS
適用
firewall-cmd --reload
制限しているIPのリスト表示
firewall-cmd --list-all
public (default, active) target: default ingress-priority: 0 egress-priority: 0 icmp-block-inversion: no interfaces: xxxxxx sources: services: xxxxxx ports: xxxxxx/tcp protocols: forward: yes masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: rule family="ipv4" source address="xxxxxx" port port="https" protocol="tcp" reject type="icmp-port-unreachable" ・ ・ ・
