readme: update names
This commit is contained in:
parent
b43791a978
commit
81d0b7f6e8
24
README.md
24
README.md
@ -22,14 +22,14 @@ KVAS2_NAME=KVAS2
|
|||||||
KVAS2_DNS_PORT=7548
|
KVAS2_DNS_PORT=7548
|
||||||
|
|
||||||
# Создание правил
|
# Создание правил
|
||||||
iptables -t nat -N ${KVAS2_NAME}_PREROUTING
|
iptables -t nat -N ${KVAS2_NAME}_DNSOVERRIDE_PREROUTING
|
||||||
iptables -t nat -A ${KVAS2_NAME}_PREROUTING -p udp --dport 53 -j REDIRECT --to-port ${KVAS2_DNS_PORT}
|
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
|
[2] Example
|
||||||
@ -41,20 +41,20 @@ TABLE=100
|
|||||||
INTERFACE=ovpn_br0
|
INTERFACE=ovpn_br0
|
||||||
|
|
||||||
# Создание правил
|
# Создание правил
|
||||||
iptables -t mangle -N ${KVAS2_NAME}_PREROUTING
|
iptables -t mangle -N ${KVAS2_NAME}_ROUTING_PREROUTING
|
||||||
iptables -t nat -N ${KVAS2_NAME}_POSTROUTING
|
iptables -t nat -N ${KVAS2_NAME}_ROUTING_POSTROUTING
|
||||||
iptables -t mangle -A ${KVAS2_NAME}_PREROUTING -m set --match-set ${IPSET_TABLE} dst -j MARK --set-mark ${MARK}
|
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}_POSTROUTING -o ${INTERFACE} -j MASQUERADE
|
iptables -t nat -A ${KVAS2_NAME}_ROUTING_POSTROUTING -o ${INTERFACE} -j MASQUERADE
|
||||||
|
|
||||||
# Применение правил
|
# Применение правил
|
||||||
ip rule add fwmark ${MARK} table ${TABLE}
|
ip rule add fwmark ${MARK} table ${TABLE}
|
||||||
ip route add default dev ${INTERFACE} table ${TABLE}
|
ip route add default dev ${INTERFACE} table ${TABLE}
|
||||||
iptables -t mangle -A PREROUTING -j ${KVAS2_NAME}_PREROUTING
|
iptables -t mangle -A PREROUTING -j ${KVAS2_NAME}_ROUTING_PREROUTING
|
||||||
iptables -t nat -A POSTROUTING -j ${KVAS2_NAME}_POSTROUTING
|
iptables -t nat -A POSTROUTING -j ${KVAS2_NAME}_ROUTING_POSTROUTING
|
||||||
|
|
||||||
# Удаление правил
|
# Удаление правил
|
||||||
ip rule del fwmark ${MARK} table ${TABLE}
|
ip rule del fwmark ${MARK} table ${TABLE}
|
||||||
ip route del default dev ${INTERFACE} table ${TABLE}
|
ip route del default dev ${INTERFACE} table ${TABLE}
|
||||||
iptables -t mangle -D PREROUTING -j ${KVAS2_NAME}_PREROUTING
|
iptables -t mangle -D PREROUTING -j ${KVAS2_NAME}_ROUTING_PREROUTING
|
||||||
iptables -t nat -D POSTROUTING -j ${KVAS2_NAME}_POSTROUTING
|
iptables -t nat -D POSTROUTING -j ${KVAS2_NAME}_ROUTING_POSTROUTING
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user