All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Andreas Hoefler <andreas.hoefler@hitachi-powergrids.com>
Cc: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: Is it possible to change a chains default policy when rules are already present?
Date: Fri, 14 Aug 2020 13:07:49 +0200	[thread overview]
Message-ID: <20200814110749.GA30331@salvia> (raw)
In-Reply-To: <AM0PR06MB4628C196EBABF0FD53AA8006C5430@AM0PR06MB4628.eurprd06.prod.outlook.com>

On Thu, Aug 13, 2020 at 12:28:34PM +0000, Andreas Hoefler wrote:
> Hi
> 
> I have a chain with default policy drop. 
> I would like to first have the default policy set to accept, then add rules and later change it to drop. 
> Is this possible?

For the record:

 nft add chain x y { policy accept\; }

Assuming an existing basechain 'y'. The backlash (\) before the
semicolon is there in case of invoking this from bash.

  parent reply	other threads:[~2020-08-14 11:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 12:28 Is it possible to change a chains default policy when rules are already present? Andreas Hoefler
2020-08-13 12:48 ` Reindl Harald
2020-08-13 12:50   ` Andreas Hoefler
2020-08-13 13:38     ` Duncan Roe
2020-08-14 11:07 ` Pablo Neira Ayuso [this message]
2020-08-14 11:21   ` Daniel
2020-08-14 11:36     ` Reindl Harald
2020-08-14 12:54       ` Daniel
2020-08-14 13:08         ` Florian Westphal
2020-08-14 13:21           ` Andreas Hoefler
2020-08-14 13:40             ` Florian Westphal
2020-08-14 13:44               ` Andreas Hoefler
2020-08-14 15:31                 ` Daniel
2020-08-14 14:37             ` Pablo Neira Ayuso
2020-08-14 11:43   ` Andreas Hoefler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200814110749.GA30331@salvia \
    --to=pablo@netfilter.org \
    --cc=andreas.hoefler@hitachi-powergrids.com \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.