mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2 4/5] nftables: Add example config file
Date: Fri,  6 Apr 2018 11:07:29 +0200	[thread overview]
Message-ID: <20180406090730.2055-5-ada@thorsis.com> (raw)
In-Reply-To: <20180406090730.2055-1-ada@thorsis.com>

This adds only empty chains, but it will be needed for the bbinit
startscript not to fail. User will probably overwrite it with something
more useful.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
 projectroot/etc/nftables.conf | 15 +++++++++++++++
 rules/nftables.make           |  1 +
 2 files changed, 16 insertions(+)
 create mode 100755 projectroot/etc/nftables.conf

diff --git a/projectroot/etc/nftables.conf b/projectroot/etc/nftables.conf
new file mode 100755
index 0000000000..2c09327d7f
--- /dev/null
+++ b/projectroot/etc/nftables.conf
@@ -0,0 +1,15 @@
+#!/usr/sbin/nft -f
+
+flush ruleset
+
+table filter {
+	chain input {
+		type filter hook input priority 0;
+	}
+	chain forward {
+		type filter hook forward priority 0;
+	}
+	chain output {
+		type filter hook output priority 0;
+	}
+}
diff --git a/rules/nftables.make b/rules/nftables.make
index 774a1fd935..6c978aa21c 100644
--- a/rules/nftables.make
+++ b/rules/nftables.make
@@ -56,6 +56,7 @@ $(STATEDIR)/nftables.targetinstall:
 	@$(call install_fixup, nftables,DESCRIPTION,missing)
 
 	@$(call install_copy, nftables, 0, 0, 0755, -, /usr/sbin/nft)
+	@$(call install_alternative, nftables, 0, 0, 0755, /etc/nftables.conf)
 
 	@$(call install_finish, nftables)
 
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2018-04-06  9:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06  9:07 [ptxdist] [PATCH v2 0/5] netfilter: Upgrades and autostart Alexander Dahl
2018-04-06  9:07 ` [ptxdist] [PATCH v2 1/5] libnftnl: Upgrade from 1.0.6 to 1.0.9 Alexander Dahl
2018-04-06  9:07 ` [ptxdist] [PATCH v2 2/5] nftables: Upgrade from v0.6 to v0.8.3 Alexander Dahl
2018-04-06  9:48   ` Alexander Dahl
2018-04-06  9:07 ` [ptxdist] [PATCH v2 3/5] nftables: Fix Vim modelines Alexander Dahl
2018-04-10  8:47   ` Michael Olbrich
2018-04-10  9:02     ` Alexander Dahl
2018-04-10 14:03       ` Michael Olbrich
2018-04-06  9:07 ` Alexander Dahl [this message]
2018-04-06  9:07 ` [ptxdist] [PATCH v2 5/5] nftables: Add bbinit startscript Alexander Dahl
2018-04-09  8:30   ` Michael Olbrich
2018-04-09  9:16     ` Alexander Dahl
2018-04-10  6:57     ` Alexander Dahl
2018-04-10  8:42       ` Michael Olbrich

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=20180406090730.2055-5-ada@thorsis.com \
    --to=ada@thorsis.com \
    --cc=ptxdist@pengutronix.de \
    /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