Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

How to TOR

Discussion in 'Daemon and QT Wallet Guides' started by xkcd, Jun 26, 2020.

  1. xkcd

    xkcd Member
    Masternode Owner/Operator

    Joined:
    Feb 19, 2017
    Messages:
    99
    Likes Received:
    68
    Trophy Points:
    68
    Dash Address:
    XpoZXRfr2iFxWhfRSAK3j1jww9xd4tJVez
    This guide will explain how to run a full node (qt-wallet) over TOR and in the later part how to host a TOR hidden service with your dashd.
    We assume you are running a full node (qt-wallet) on windows, but Mac will be very similar. First head on over to clearnet URL https://www.torproject.org/ and fetch the TOR Bundle. Unzip and run the TOR Browser, or install and run the TOR Browser, you should see a web browser window open up after about 30 seconds, you are now connected to TOR.

    There are two ways to configure your dash qt-wallet to use the TOR network to increase your anonimity.
    1. Configure the proxy in the UI.
    2. Configure the proxy in the dash.conf.
    Advantage of option 1 over two is it is easier, advantage of option 2 over 1 is you are able to configure individual instances of the qt wallet assuming you run more than one at the same time like I do. :p

    If the proxy is configured in the dash.conf it will override the setting in the UI.

    1. Configure the proxy in the UI.
      In the QT wallet goto Settings -> Options and choose Network. Enable the checkbox for SOCKS5 :eek: Proxy and enter 127.0.0.1 for the IP and 9150 for the port. :)
      upload_2020-6-27_1-56-43.png
      Press OK and close the wallet and restart it, it will now connect to TOR and use that to sync the blockchain and send/recieve your transactions. You will need to remember to start the TOR Browser first each time or else the wallet will not sync.

    2. Configure the proxy in the dash.conf.
      Open the Run Dialog box with Win + R key combo and paste in the blob %APPDATA%\DashCore and press Enter. The folder containing dash.conf is opened, edit it with a text editor and add the line
      proxy=127.0.0.1:9150
      Save the file and restart your QT wallet.


    To host a TOR hidden service for your dashd you need Linux, Fedora or Ubuntu and the dashd daemon. Start with installing TOR, sudo apt install tor and the extra lines to the torrc file with below command.
    Code:
    sudo bash -c "echo -e 'ControlPort 9051\nCookieAuthentication 1\nCookieAuthFileGroupReadable 1' >> /etc/tor/torrc"
    
    (Re)start TOR with
    Code:
    sudo systemctl stop tor
    sudo systemctl start tor
    
    Determine the group your TOR is running under, this differs :mad: from system to system, for example on Fedora it is toranon and on RaspPi it is debian-tor use the command tail /etc/group and refer to the last line for the group name. Next check the group name your your dashd runs under and create the command below for your environment such that you are adding the dashd group to the tor group.
    Code:
    sudo usermod -a -G toranon dash
    
    Shutdown your dashd with dash-cli stop and edit the dash.conf file and add the below two lines.
    proxy=127.0.0.1:9050
    torcontrol=127.0.0.1:9051
    Restart your dashd and monitor the debug.log for onion word, eg
    Code:
    grep -i onion ~/.dashcore/debug.log
    
    It should print your onion address similar to below and that means you are connected and running a TOR hidden service.
    2020-06-26 14:00:51 tor: Got service ID rjj3r2qp4r5h4tfk, advertising service rjj3r2qp4r5h4tfk.onion:30000
    2020-06-26 14:00:51 AddLocal(rjj3r2qp4r5h4tfk.onion:30000,4)
    You can further verify it is connecting with sudo netstat -nap|grep dashd and note in the list that the dashd only connects to the localhost on port 9050 and those connections are ESTABLISHED.

    Reference -> https://en.bitcoin.it/wiki/Setting_up_a_Tor_hidden_service
     
    #1 xkcd, Jun 26, 2020
    Last edited: Jun 26, 2020
    • Like Like x 2
    • Winner Winner x 2
  2. xkcd

    xkcd Member
    Masternode Owner/Operator

    Joined:
    Feb 19, 2017
    Messages:
    99
    Likes Received:
    68
    Trophy Points:
    68
    Dash Address:
    XpoZXRfr2iFxWhfRSAK3j1jww9xd4tJVez
    Why even bother with this?

    Currently the network protocol is not encrypted, so when you open a wallet to sync it and send transactions your ISP or a snoopy government agency can tap your internet connection and see that you are running a dash node, and mixing if you do it and that you are sending transactions from the wallet, this is not ideal if privacy is important to you. Running the wallet over TOR helps with your privacy because those snoopy agencies can no longer see the traffic on your network, they don't even know if you are operating a dash wallet or not. You should also be using a VPN, and VPN does much the same thing as TOR is doing for you, but costs you money, don't use a free service they don't protect you.
     
    #2 xkcd, Jun 26, 2020
    Last edited: Jun 26, 2020
    • Like Like x 3
  3. Christopher Fisher

    Christopher Fisher New Member

    Joined:
    Dec 12, 2019
    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    1
    Previously I was using paid VPN for this but now I should give a try on this.
     
    • Like Like x 1