From 81d0b7f6e874bbacd8a7a49d8238fbed80c8580c Mon Sep 17 00:00:00 2001 From: Vladimir Avtsenov Date: Sat, 24 Aug 2024 20:23:30 +0300 Subject: [PATCH] readme: update names --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 44c4ea0..401b1a9 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,14 @@ KVAS2_NAME=KVAS2 KVAS2_DNS_PORT=7548 # Создание правил -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 -N ${KVAS2_NAME}_DNSOVERRIDE_PREROUTING +iptables -t nat -A ${KVAS2_NAME}_DNSOVERRIDE_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 -I PREROUTING 1 -j ${KVAS2_NAME}_DNSOVERRIDE_PREROUTING # Удаление правил -iptables -t nat -D PREROUTING -j ${KVAS2_NAME}_PREROUTING +iptables -t nat -D PREROUTING -j ${KVAS2_NAME}_DNSOVERRIDE_PREROUTING ``` [2] Example @@ -41,20 +41,20 @@ TABLE=100 INTERFACE=ovpn_br0 # Создание правил -iptables -t mangle -N ${KVAS2_NAME}_PREROUTING -iptables -t nat -N ${KVAS2_NAME}_POSTROUTING -iptables -t mangle -A ${KVAS2_NAME}_PREROUTING -m set --match-set ${IPSET_TABLE} dst -j MARK --set-mark ${MARK} -iptables -t nat -A ${KVAS2_NAME}_POSTROUTING -o ${INTERFACE} -j MASQUERADE +iptables -t mangle -N ${KVAS2_NAME}_ROUTING_PREROUTING +iptables -t nat -N ${KVAS2_NAME}_ROUTING_POSTROUTING +iptables -t mangle -A ${KVAS2_NAME}_ROUTING_PREROUTING -m set --match-set ${IPSET_TABLE} dst -j MARK --set-mark ${MARK} +iptables -t nat -A ${KVAS2_NAME}_ROUTING_POSTROUTING -o ${INTERFACE} -j MASQUERADE # Применение правил ip rule add fwmark ${MARK} table ${TABLE} ip route add default dev ${INTERFACE} table ${TABLE} -iptables -t mangle -A PREROUTING -j ${KVAS2_NAME}_PREROUTING -iptables -t nat -A POSTROUTING -j ${KVAS2_NAME}_POSTROUTING +iptables -t mangle -A PREROUTING -j ${KVAS2_NAME}_ROUTING_PREROUTING +iptables -t nat -A POSTROUTING -j ${KVAS2_NAME}_ROUTING_POSTROUTING # Удаление правил ip rule del fwmark ${MARK} table ${TABLE} ip route del default dev ${INTERFACE} table ${TABLE} -iptables -t mangle -D PREROUTING -j ${KVAS2_NAME}_PREROUTING -iptables -t nat -D POSTROUTING -j ${KVAS2_NAME}_POSTROUTING +iptables -t mangle -D PREROUTING -j ${KVAS2_NAME}_ROUTING_PREROUTING +iptables -t nat -D POSTROUTING -j ${KVAS2_NAME}_ROUTING_POSTROUTING ```