背景说明
部分节点因系统缺少 iptables 防火墙工具,影响节点正常运行及收益计算。若您的节点详情页有提示需要安装iptables,请按照以下文档进行安装。
iptables
适用范围 本教程适用于 Ubuntu/Debian (apt) 等系统。
通过cmd命令行输入
which iptables
已安装: 如果返回 iptables 的安装路径(例如 /usr/sbin/iptables 或 /sbin/iptables),则表明 iptables 已存在,无需后续安装步骤。
/usr/sbin/iptables
/sbin/iptables
未安装: 如果没有任何输出或提示 command not found,请继续执行步骤 2 进行安装。
command not found
sudo apt update
说明: 此步骤确保获取最新的软件包信息,是安装前的最佳实践
说明: -y 参数表示自动确认安装提示,避免手动交互。
-y
安装完成后,执行以下命令验证:
安装成功: 命令将输出已安装的 iptables 版本号(例如 iptables v1.8.7 (nf_tables))。
iptables v1.8.7 (nf_tables)
安装失败: 如果仍提示 command not found 或报错,请检查步骤 2 和 3 的执行过程是否有错误输出。
最后更新于6个月前
sudo apt install iptables -y
iptables --version