FirewallD で特定の IP アドレスをブロックする
コマンドラインで IP アドレスをブロックする
- 「/etc/firewalld/zones/drop.xml」を編集する
「vi /etc/firewalld/zones/drop.xml」<?xml version=”1.0″ encoding=”utf-8″?>
<zone target=”DROP”>
<short>Drop</short>
<description>Unsolicited incoming network packets are dropped. Incoming packets that are related to outgoing network connections are accepted. Outgoing network connections are allowed.</description>
<source address=”23.95.230.163“/>
<source address=”23.236.126.0/24“/>
</zone>
※ 破棄したいアドレスを記述する。
- ロードして反映する
# firewall-cmd –reload
success
#
FirewallD の GUI でブロックする
GUI ツール(firewall-config)のインストールの仕方はコチラをご覧下さい。
- GUI ツール(firewall-config)を起動し、「永続」を選択し、「drop」を選択後「追加」を押下して入力


