Skip to contentSkip to conversation

files: Add inet family nat config

PATCH Applied Phil Sutter 2 participants 2 messages Jul 4, 2019 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 files: Add inet family nat config

---
 files/nftables/Makefile.am    | 1 +
 files/nftables/all-in-one.nft | 1 +
 files/nftables/inet-nat.nft   | 8 ++++++++
 3 files changed, 10 insertions(+)
 create mode 100755 files/nftables/inet-nat.nft
files/nftables/Makefile.am +1 -0
index a93b7978f62d4..2a511cd1729c1 100644
@@ -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		\
files/nftables/all-in-one.nft +1 -0
index 4ccc043259c10..d3aa7f37f29f1 100755
@@ -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"
files/nftables/inet-nat.nft new file +8 -0
new file mode 100755
index 0000000000000..52fcdb543ddab
@@ -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; }
+}
Signature · 1 line
2.21.0