From 805e8038dc408b2f79b5fcdf8b4debcc4c4d9a74 Mon Sep 17 00:00:00 2001 From: "redouane.assani" Date: Wed, 26 Mar 2025 15:41:39 +0100 Subject: [PATCH] debug --- sisr1/TP05-installation-proxy/nat/dnsfwd.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sisr1/TP05-installation-proxy/nat/dnsfwd.sh diff --git a/sisr1/TP05-installation-proxy/nat/dnsfwd.sh b/sisr1/TP05-installation-proxy/nat/dnsfwd.sh new file mode 100644 index 0000000..36826d4 --- /dev/null +++ b/sisr1/TP05-installation-proxy/nat/dnsfwd.sh @@ -0,0 +1,11 @@ +#!/bin/bash +echo "1" > /proc/sys/net/ipv4/ip_forward +nft add table dnsfwd +nft add chain dnsfwd prerouting {type nat hook prerouting priority 0 \; } +nft add chain dnsfwd postrouting {type nat hook postrouting priority 0 \; } +nft add rule dnsfwd postrouting tcp dport 53 masquerade +nft add rule dnsfwd postrouting udp dport 53 masquerade +nft add rule dnsfwd prerouting tcp dport 53 masquerade +nft add rule dnsfwd prerouting udp dport 53 masquerade +nft add rule dnsfwd prerouting ct state established,related accept +nft add rule dnsfwd postrouting ct state established,related accept