1

I have configured a TOR hidden service using the default setup, meaning that requests come from 127.0.0.1. Is there a way to set up a different subnet to divide TOR connections from localhost ones?

Actual TOR configuration:

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:8081

Example of actual NginX access log:

127.0.0.1 - - [15/Jul/2020:14:28:26 +0200] "GET / HTTP/2.0" 200 2524 "-" "curl/7.71.1"
127.0.0.1 - - [15/Jul/2020:14:27:37 +0200] "GET / HTTP/1.1" 200 17234 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"

Example of wanted NginX access log:

127.0.0.1 - - [15/Jul/2020:14:28:26 +0200] "GET / HTTP/2.0" 200 2524 "-" "curl/7.71.1"
127.0.1.1 - - [15/Jul/2020:14:27:37 +0200] "GET / HTTP/1.1" 200 17234 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"

Using linux and the latest tor

2
  • What about just binding to a different localhost address like 127.0.0.2? Or if you want a different subnet, 127.0.1.1?
    – Steve
    Jul 15 '20 at 12:58
  • 1
    @Steve If I bind tor to 127.0.0.2:80 and the service to 127.0.0.2:8081 I still read the logs from 127.0.0.1. If I bind to 127.0.0.1.2:80 the onion address is not reachable anymore, and if I curl 127.0.1.2:8081 from the same machine I log the access from 127.0.0.1
    – Polizi8
    Jul 15 '20 at 13:13

Your Answer

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

Browse other questions tagged or ask your own question.