I need to create a secure tunnel from my server to the torsite.onion:port. As an example when I connect to myserver at myserver:port it will redirect to the tormailxxxxx.onion:25 for the tor email service. I hope this solution will be really easy to do, but so far I couldn't find any sufficient solution. Thank you in advance
You need a Stunnel with full verification enabled (
verify=3 in config) and your local SSL microCA. For microCA I do recommend you to try either an OpenSSL perl scripts, or easyRSA as something more advanced.