Секурно?
VirtualAddrNetworkIPv4 10.192.0.0/10
AutomapHostsOnResolve 1
TransPort 192.168.247.1:9040
DNSPort 192.168.247.1:53
!/bin/sh
ip netns add tor
ip link add name torin type veth peer name torout
ip link set dev torin netns tor
ip netns exec tor ip a a 192.168.247.2/24 dev torin
ip a a 192.168.247.1/24 dev torout
ip netns exec tor ip link set dev torin up
ip link set dev torout up
ip netns exec tor ip r add default via 192.168.247.1
iptables -t nat -A PREROUTING -i torout -p tcp --syn -j REDIRECT --to-ports 9040
iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
iptables -A INPUT -i torout -p tcp -j ACCEPT
iptables -A INPUT -i torout -p udp --dport 53 -j ACCEPT
iptables -A INPUT -i torout -j REJECT