我试图设置openvpn,我需要添加以下规则:
iptables -A FORWARD -s 10.8.0.0/24 -d 0/0 -j ACCEPT
但是,添加此规则并运行iptables -LI后,得到以下输出:
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- server.hosting.invalid/24 anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination
其中明确指出在添加该规则或其他方面存在错误。 它必须是来自我的主机提供商的消息。 任何想法我怎么能使这个规则工作?
谢谢。
ACCEPT all -- server.hosting.invalid/24 anywhere which clearly states that there is an error in adding that rule or something.
这不一定是错误。 这可能只是因为你在/etc/networks文件中定义了10.8.0.0或类似的东西。 它可能只是DNSparsing。 尝试将-n传递给iptables以跳过DNSparsing。
在任何情况下,鉴于您的防火墙的当前状态,你真的不需要这个规则。 一切都已经被接受了。 (policy ACCEPT)
它可能是您的托pipe服务提供商的无效子网(10.xxx是私人的,在互联网上无法路由)。 但我相信这里没有任何问题,因为您将使用VPN和10.xxx将在您的服务器本地路由。