iptablesルールはIPセットを操作できますか?

iptablesルールはIPセットを操作できますか?

存在するiptables-extensions(8)モジュールは、setIPの存在または不在に反応することができるか、より一般的にはIPセットの一致に応答できることを説明および議論します。

ただし、ルールを使用してエントリをIPセットに動的にリンクする方法はないようですiptables

アイデアは、このrecentモジュールを使用すると、引き続き試みる特定のIPを一時的にブラックリストに追加し、それをIPセットに追加できることです(より速い場合があります)。これは、そのような場合、通過する必要があるルールが少なく、IPセットとの一致がより速いことを意味します。

ベストアンサー1

それは明らかですはいおそらく、次にSET説明する目標を使用してください。iptables-extensions(8)

SET
   This module adds and/or deletes entries from IP sets which can be defined by ipset(8).

   --add-set setname flag[,flag...]
          add the address(es)/port(s) of the packet to the set

   --del-set setname flag[,flag...]
          delete the address(es)/port(s) of the packet from the set

          where flag(s) are src and/or dst specifications and there can be no more
          than six of them.

   --timeout value
          when adding an entry, the timeout value to use instead of the default one
          from the set definition

   --exist
          when  adding  an  entry  if it already exists, reset the timeout value to
          the specified one or to the default from the set definition

   Use of -j SET requires that ipset kernel support is provided, which, for standard
   kernels, is the case since Linux 2.6.39.

モジュールの説明を見つけた後、それ以上検索しなかったので見つかりませんでしたset

おすすめ記事