I'm looking to setup iptables rules that redirects traffic (in this case, smtp traffic) to a hidden service on a different server. I've done this before with an OpenVPN connection, but now I want to be able to do so for hidden services.

The issue I'm running into is that iptables doesn't see the MapAddress IP that i set in torrc. What would be the best way of routing incoming traffic to a .onion hidden service?

1 Answer 1


If you've configured torrc to properly resolve .onion addresses, you may need to first make sure that those requests are being sent to the proper port (often this is port 9040 in a lot of example HowTo's). You may need to first create an IPtables rule to redirect requests to this port.

You can take a look at Tails as an example to has properly configured DNS via iptables. https://tails.boum.org/contribute/design/Tor_enforcement/#index1h1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.