we want to configure a TOR router to route public static IP addresses to hidden services.
Currently we have the following setup working:
VirtualAddrNetworkIPv4 10.192.0.0/10
VirtualAddrNetworkIPv6 [FC00::]/7
AutomapHostsOnResolve 1
TransPort 127.0.0.1:9040
TransPort [::1]:9040
DNSPort 127.0.0.1:5300
DNSPort [::1]:5300
iptables -t nat -A OUTPUT -p tcp -d 10.192.0.0/10 -j REDIRECT --to-ports 9040
ip6tables -t nat -A OUTPUT -p tcp -d FC00::/7 -j REDIRECT --to-ports 9040
My first idea was to use the public static IP-networks with the PREROUTING chain. Updating the IP-addresses every 60 seconds is a no-go as DNSSEC will be used to validate the DNS A/AAAA-record lookups. We also need additional DNS-records (e.g. MX-RRs) which won't work with the TOR resolver.
I already tried
MapAddress <hidden service>.onion 10.192.0.4
which results in a correct A-RR when VirtualAddrNetworkIPv4 is uncommented. But TOR doesn't route the packets.
Thanx for any hint,
Renne