summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_pkttype.txlate
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libxt_pkttype.txlate')
-rw-r--r--extensions/libxt_pkttype.txlate8
1 files changed, 8 insertions, 0 deletions
diff --git a/extensions/libxt_pkttype.txlate b/extensions/libxt_pkttype.txlate
new file mode 100644
index 00000000..6506a380
--- /dev/null
+++ b/extensions/libxt_pkttype.txlate
@@ -0,0 +1,8 @@
+iptables-translate -A INPUT -m pkttype --pkt-type broadcast -j DROP
+nft add rule ip filter INPUT pkttype broadcast counter drop
+
+iptables-translate -A INPUT -m pkttype ! --pkt-type unicast -j DROP
+nft add rule ip filter INPUT pkttype != unicast counter drop
+
+iptables-translate -A INPUT -m pkttype --pkt-type multicast -j ACCEPT
+nft add rule ip filter INPUT pkttype multicast counter accept