SUBDIRS = src \
include \
+ files \
doc
EXTRA_DIST = tests \
include/linux/netfilter_bridge/Makefile \
include/linux/netfilter_ipv4/Makefile \
include/linux/netfilter_ipv6/Makefile \
+ files/Makefile \
+ files/nftables/Makefile \
doc/Makefile \
])
AC_OUTPUT
--- /dev/null
+SUBDIRS = nftables
--- /dev/null
+pkgsysconfdir = ${sysconfdir}/nftables
+dist_pkgsysconf_DATA = all-in-one.nft \
+ arp-filter.nft \
+ bridge-filter.nft \
+ inet-filter.nft \
+ ipv4-filter.nft \
+ ipv4-mangle.nft \
+ ipv4-nat.nft \
+ ipv4-raw.nft \
+ ipv6-filter.nft \
+ ipv6-mangle.nft \
+ ipv6-nat.nft \
+ ipv6-raw.nft
+
+install-data-hook:
+ ${SED} -i 's|@sbindir[@]|${sbindir}/|g' ${DESTDIR}${pkgsysconfdir}/*
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
# Here is an example of different families, hooks and priorities in the
# nftables framework, all mixed together.
-# This script is mean to be loaded with `nft -f <file>`
+#
+# more examples are located in files/examples in nftables source.
# For up-to-date information please visit https://wiki.nftables.org
+#
+# This script is mean to be loaded with `nft -f <file>`
+# clear all prior state
flush ruleset
# native dual stack IPv4 & IPv6 family
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table arp filter {
chain input { type filter hook input priority 0; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table bridge filter {
chain input { type filter hook input priority -200; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table inet filter {
chain input { type filter hook input priority 0; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table filter {
chain input { type filter hook input priority 0; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table mangle {
chain output { type route hook output priority -150; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table nat {
chain prerouting { type nat hook prerouting priority -100; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table raw {
chain prerouting { type filter hook prerouting priority -300; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table ip6 filter {
chain input { type filter hook input priority 0; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table ip6 mangle {
chain output { type route hook output priority -150; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table ip6 nat {
chain prerouting { type nat hook prerouting priority -100; }
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
table ip6 raw {
chain prerouting { type filter hook prerouting priority -300; }