Исправление Black_Shadow, (текущая версия) :
zone "onion." in {
type forward;
forwarders {
127.0.0.1 port 9053; //TOR
};
};
VirtualAddrNetworkIPv4 172.16.0.0/12
. Заодно включаешь DNS: DNSPort 9053
.
ipset create tor hash:net comment
. iptables -t nat -A PREROUTING -p tcp -m set --match set tor dst -j REDIRECT --to-port 9040
iptables -t nat -A OUTPUT -p tcp -m set --match-set tor dst -j REDIRECT --to-port 9040
ipset add 172.16.0.0/12 comment tor
Потом, в случае необходимости, в этот же сет можешь добавлять другие адреса, чтобы трафик на них шёл через tor.
Исходная версия Black_Shadow, :
zone "onion." in {
type forward;
forwarders {
127.0.0.1 port 9053; //TOR
};
};
VirtualAddrNetworkIPv4 172.16.0.0/12
. Заодно включаешь DNS: DNSPort 9053
.
ipset create tor hash:net comment
. iptables -t nat -A PREROUTING -p tcp -m set --match set tor dst -j REDIRECT --to-port 9040
iptables -t nat -A OUTPUT -p tcp -m set --match-set tor dst -j REDIRECT --to-port 9040
ipset add 172.16.0.0/12 comment tor