![iptables 错误,没有这样的文件或目录](https://linux22.com/image/669751/iptables%20%E9%94%99%E8%AF%AF%EF%BC%8C%E6%B2%A1%E6%9C%89%E8%BF%99%E6%A0%B7%E7%9A%84%E6%96%87%E4%BB%B6%E6%88%96%E7%9B%AE%E5%BD%95.png)
我有 CentOS 6 x86_64 vps 服务器。我刚刚创建了以下 iptables。但它给出了一条错误消息。我在这里做错了什么?
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:SERVICE - [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/s --limit-burst 4 -j ACCEPT
-A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp -m state --state NEW -j SERVICES
-A INPUT -p udp --sport 53 -j ACCEPT
-A INPUT -p udp --sport 123 --dport 123 -j ACCEPT
-A SERVICES -p tcp --dport 61203 -j ACCEPT
-A SERVICES -p tcp --dport 80 -j ACCEPT
-A SERVICES -p tcp --dport 443 -j ACCEPT
COMMIT
# service iptables start
iptables: Applying firewall rules: iptables-restore v1.4.7: Couldn't load target `SERVICES':/lib64/xtables/libipt_SERVICES.so: cannot open shared object file: No such file or directory
Error occurred at line: 9
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
答案1
:SERVICE - [0:0]
...
-A SERVICES -p tcp --dport 61203 -j ACCEPT
-A SERVICES -p tcp --dport 80 -j ACCEPT
-A SERVICES -p tcp --dport 443 -j ACCEPT
注意到这个问题了吗?
:)
提示:(鼠标悬停)
您的单数/复数不匹配。