I need some clarification. If I add this rule

nft add rule ip filter INPUT ip daddr drop

nftables will ignore it and never acknowledge because it is on end of the rules?

  • I can't see what exactly is your question. Are you just looking for confirmation? – ctrl-alt-delor Jan 15 '20 at 10:28
  • I think it will be ignored, because it is not hooked on to a chain. – ctrl-alt-delor Jan 15 '20 at 10:28
  • Yeah, looking for confirmation if that is true. – Delirium Jan 15 '20 at 11:26
  • if you have a rule before with something like iif lo accept then your rule happens too late. The answer depends on the ruleset, else it's not possible to know for sure. Of course the INPUT chain has to be defined or this will just give an error – A.B Jan 17 '20 at 0:33

So I found answer for my issue.

The stuff is about filters..in nft terminology CHAINS. If I want to add rule, I need to add it to specific chain, otherwise it will ignore my rule and take it as nonsense.

so if I wanted to use this rule nft add rule ip filter INPUT ip daddr drop I already had to have created chain named INPUT. Since nft is case sensitive, INPUT and input can be two differend chains.

Rules are or what I understood should be used right after they are added to Chain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.