summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_cgroup.txlate
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libxt_cgroup.txlate')
-rw-r--r--extensions/libxt_cgroup.txlate5
1 files changed, 5 insertions, 0 deletions
diff --git a/extensions/libxt_cgroup.txlate b/extensions/libxt_cgroup.txlate
new file mode 100644
index 00000000..75f2e6ae
--- /dev/null
+++ b/extensions/libxt_cgroup.txlate
@@ -0,0 +1,5 @@
+iptables-translate -t filter -A INPUT -m cgroup --cgroup 0 -j ACCEPT
+nft add rule ip filter INPUT meta cgroup 0 counter accept
+
+iptables-translate -t filter -A INPUT -m cgroup ! --cgroup 0 -j ACCEPT
+nft add rule ip filter INPUT meta cgroup != 0 counter accept