]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
files: Add inet family nat config
authorPhil Sutter <phil@nwl.cc>
Thu, 4 Jul 2019 10:22:45 +0000 (12:22 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 4 Jul 2019 12:36:18 +0000 (14:36 +0200)
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
files/nftables/Makefile.am
files/nftables/all-in-one.nft
files/nftables/inet-nat.nft [new file with mode: 0755]

index a93b7978f62d4991f0b36e3e1f9d15e1c7a339de..2a511cd1729c1870b22df6a4a951fb0f6ac20473 100644 (file)
@@ -3,6 +3,7 @@ dist_pkgsysconf_DATA =  all-in-one.nft          \
                        arp-filter.nft          \
                        bridge-filter.nft       \
                        inet-filter.nft         \
+                       inet-nat.nft            \
                        ipv4-filter.nft         \
                        ipv4-mangle.nft         \
                        ipv4-nat.nft            \
index 4ccc043259c109281f4d7c2219967315c617de5e..d3aa7f37f29f1fb5e26246939d99788a6183b97c 100755 (executable)
@@ -13,6 +13,7 @@ flush ruleset
 
 # native dual stack IPv4 & IPv6 family
 include "./inet-filter.nft"
+include "./inet-nat.nft"
 
 # netdev family at ingress hook. Attached to a given NIC
 include "./netdev-ingress.nft"
diff --git a/files/nftables/inet-nat.nft b/files/nftables/inet-nat.nft
new file mode 100755 (executable)
index 0000000..52fcdb5
--- /dev/null
@@ -0,0 +1,8 @@
+#!@sbindir@nft -f
+
+table inet nat {
+       chain prerouting        { type nat hook prerouting priority -100; }
+       chain input             { type nat hook input priority 100; }
+       chain output            { type nat hook output priority -100; }
+       chain postrouting       { type nat hook postrouting priority 100; }
+}