
我最近為我的 Centos (Linux 2.6.18-194.11.3.el5 i686) 安裝了 ipset rpm 和 kmod-ipset rpm 並嘗試借助互聯網上的一些示例,但是當我嘗試禁止嘗試連接的用戶時遠程伺服器的連接埠443 自動加入到ipset bann 清單我收到以下錯誤。
指令= ipset -N 禁止的主機 iphash
iptables -I FORWARD -p tcp --dport 443 -j SET --add-set Banned_hosts src
錯誤= iptables v1.3.5:未知參數`--add-set'
請幫我做錯了什麼。
答案1
該命令有效,但您的版本太舊,它們不匹配。核心和 iptables 可能具有不相容的協定版本。您至少必須下載原始程式碼並編譯新版本的 iptables。您需要使用 make module 和 module_install 指令將新版本安裝到正在執行的核心。您可能必須對 ipset 執行相同的操作。可從 netfilter.org 取得。