failed to append linux nat table (iptables)

When I enter command as below

iptables -t nat -A PREROUTING -i eth0 -s 10.0.0.0/8 -j DROP

it always displays

the "nat" table is not intended for filter,the use of DROP is therefore inhibited

But I get this rule from various guides,is there any miscommunication on it?

Any help will be appreciated.

Thanks.

阅读 3.3k
2 个回答

因为在 nat 里做 filter 不太合适,新版本的 iptables 就废弃了这个功能。

估计你看的教程比较久远了吧

You can use iptables's filter table not nat table

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题