From 854593d879c94be60ce68c5c16f01b2d2caf8a41 Mon Sep 17 00:00:00 2001 From: Vladimir Avtsenov Date: Sat, 24 Aug 2024 20:12:45 +0300 Subject: [PATCH] readme: update rules for DNS override --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a42c5f..2613010 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,18 @@ Roadmap: [1] Example ```bash +KVAS2_NAME=KVAS2 KVAS2_DNS_PORT=7548 -iptables -t nat -I PREROUTING 1 -p udp --dport 53 -j REDIRECT --to-port $KVAS2_DNS_PORT + +# Создание правил +iptables -t nat -N ${KVAS2_NAME}_PREROUTING +iptables -t nat -A ${KVAS2_NAME}_PREROUTING -p udp --dport 53 -j REDIRECT --to-port ${KVAS2_DNS_PORT} + +# Применение правил +iptables -t nat -I PREROUTING 1 -j ${KVAS2_NAME}_PREROUTING + +# Удаление правил +iptables -t nat -D PREROUTING -j ${KVAS2_NAME}_PREROUTING ``` [2] Example