我已经搜索了一段时间,但没有解决我的问题。我正在设置邮件服务器,但是在写入 iptables 时,出现错误:
iptables-restore:第 2 行失败。
我正在尝试使用以下 /etc/iptables.test.rules:
# Allows SMTP access
-A INPUT -p tcp --dport 25 -j ACCEPT
# Allows pop and pops connections
-A INPUT -p tcp --dport 110 -j ACCEPT
-A INPUT -p tcp --dport 995 -j ACCEPT
# Allows imap and imaps connections
-A INPUT -p tcp --dport 143 -j ACCEPT
-A INPUT -p tcp --dport 993 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)
在此之后,我发出以下命令:
sudo iptables-restore < /etc/iptables.test.rules
Run Code Online (Sandbox Code Playgroud)
但是我得到了这个:
iptables-restore: line 2 failed.
Run Code Online (Sandbox Code Playgroud)
我不知道是什么问题。任何人都可以澄清吗?
我使用的是 Ubuntu 10.10 LTS