1

I run dnsmasq locally as a cache server, in the old days, I allow all INPUT packets from lo+, and set policy of INPUT to DROP:

-A INPUT -i lo+ -j ACCEPT

Now I decide to put this on the raw table to speed up rules matching,

-A PREROUTING -i lo+ -j ACCEPT

But that doesn't work as expected. Why? Since the packets get processed by the raw table first, then nat, then filter, why isn't that rule work the same as the old one?

daisy
  • 747
  • 4
  • 13
  • 28

1 Answers1

2

See iptables port redirect not working for localhost.

PREROUTING isn't used by the loopback interface

I'd hazard this applies to every table regardless of the chain. Also, you should post the whole command line for a question instead of the tail snippet.

Jeff Ferland
  • 20,239
  • 2
  • 61
  • 85