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.

Mar.25,2021

because it is not appropriate to do filter in nat, the new version of iptables discards this feature.

I guess you've been reading the tutorials for a long time


You can use iptables's filter table not nat table

Menu