Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: giorgio.nicole@arcor.de
Cc: netfilter@vger.kernel.org
Subject: Re: Re: Re: nft 'script' not working
Date: Tue, 20 Oct 2015 20:15:53 +0200	[thread overview]
Message-ID: <20151020181553.GA1430@salvia> (raw)
In-Reply-To: <1391689054.175444.1445351667675.JavaMail.ngmail@webmail12.arcor-online.net>

On Tue, Oct 20, 2015 at 04:34:27PM +0200, giorgio.nicole@arcor.de wrote:
> Hi,
> 
> that's right but my main script fw_basic.nft should be a read only file;
> the dynamic behavior should result from the content of the included files
> at the end of the script.
> 
> ...
> include "/var/lib/nftables/user.nft"
> include "/var/lib/nftables/dnats.nft"
> 
> In my target system I have two configuration programs/daemons: the first
> generates the nft file '/var/lib/nftables/user.nft' with rules from the user, the
> second generates dnat rules (actually one rule with a set of multiple targets)
> on the basis of zeroconfig-found devices in the file '/var/lib/nftables/dnats.nft';
> 
> The main nft script then includes both the generated files actually implementing
> a dynamic firewall config.
> 
> This also works in case the user, for example, disables his part of the configuration:
> in this case the file '/var/lib/nftables/user.nft' will be empty and the next call to the script
> '/etc/nftable/fw_basic.nft' will actually (atomically) remove the user configs from the firewall.

Make sense.

Will ping you once I have push out the kernel patches to remove the
existing limitation on updating objects from the same batch, so you
have the chance to test it.

Thanks.

      reply	other threads:[~2015-10-20 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 14:34 Aw: Re: Re: nft 'script' not working giorgio.nicole
2015-10-20 18:15 ` Pablo Neira Ayuso [this message]

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=20151020181553.GA1430@salvia \
    --to=pablo@netfilter.org \
    --cc=giorgio.nicole@arcor.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox