Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Abiky on February 19, 2016, 10:24:33 PM



Title: Making a BTC node hidden service?
Post by: Abiky on February 19, 2016, 10:24:33 PM
As far as I know, there isn't practically any BTC nodes running under the Tor network. (based on what I have seen on the web) I would like to know how do I setup a full BTC node that would run as a hidden service under the onion network. Is there any simple way to do this? A guide or tutorial would be really helpful. Please let me know since I want to support Bitcoin as much as I can.  :)


Title: Re: Making a BTC node hidden service?
Post by: achow101 on February 19, 2016, 11:46:27 PM
It is actually very simple now. First start up tor, then start Bitcoin Core with the -listenonion flag and -torpassword=<pass> flag where <pass> is your control port password if you have one set. In order to use it though, you will need to enable the control port in the torrc file.


Title: Re: Making a BTC node hidden service?
Post by: Abiky on February 20, 2016, 12:27:21 AM
It is actually very simple now. First start up tor, then start Bitcoin Core with the -listenonion flag and -torpassword=<pass> flag where <pass> is your control port password if you have one set. In order to use it though, you will need to enable the control port in the torrc file.

Thanks for your reply. I will give this a shot for the BTC onion node. Just one more thing though, is it necessary to leave Tor open for this to work or is it safe to close it after running Bitcoin Core?  :)


Title: Re: Making a BTC node hidden service?
Post by: achow101 on February 20, 2016, 12:39:17 AM
It is actually very simple now. First start up tor, then start Bitcoin Core with the -listenonion flag and -torpassword=<pass> flag where <pass> is your control port password if you have one set. In order to use it though, you will need to enable the control port in the torrc file.

Thanks for your reply. I will give this a shot for the BTC onion node. Just one more thing though, is it necessary to leave Tor open for this to work or is it safe to close it after running Bitcoin Core?  :)
I think it needs to be left open as it uses Tor for doing Tor stuff.


Title: Re: Making a BTC node hidden service?
Post by: Foxpup on February 20, 2016, 03:10:46 AM
It is actually very simple now. First start up tor, then start Bitcoin Core with the -listenonion flag and -torpassword=<pass> flag where <pass> is your control port password if you have one set. In order to use it though, you will need to enable the control port in the torrc file.
For clarification, by "now", he means Bitcoin Core 0.12. For earlier versions, you will need to configure Tor to run a hidden service. Instructions can be found here (https://www.torproject.org/docs/tor-hidden-service.html.en#two). For a Bitcoin node instead of a webserver, change HiddenServicePort to "8333 127.0.0.1:8333". Then, find your onion address in the hostname file, go into bitcoin.conf and add externalip=youraddress.onion, along with listen=1 (assuming Bitcoin is already configured to connect through Tor). It can take a while for new hidden services to show up on the Tor network, so be patient.


Title: Re: Making a BTC node hidden service?
Post by: achow101 on February 20, 2016, 03:59:05 AM
It is actually very simple now. First start up tor, then start Bitcoin Core with the -listenonion flag and -torpassword=<pass> flag where <pass> is your control port password if you have one set. In order to use it though, you will need to enable the control port in the torrc file.
For clarification, by "now", he means Bitcoin Core 0.12. For earlier versions, you will need to configure Tor to run a hidden service. Instructions can be found here (https://www.torproject.org/docs/tor-hidden-service.html.en#two). For a Bitcoin node instead of a webserver, change HiddenServicePort to "8333 127.0.0.1:8333". Then, find your onion address in the hostname file, go into bitcoin.conf and add externalip=youraddress.onion, along with listen=1 (assuming Bitcoin is already configured to connect through Tor). It can take a while for new hidden services to show up on the Tor network, so be patient.
Right, forgot to mention that. However, Bitcoin Core 0.12 will be released very soon. Probably within a day or two, so if you want to do it the easy way, just wait a little bit and wait for the official release. If you are impatient, you can download the binaries from my github at https://github.com/achow101/bitcoin/releases/tag/v0.12.0. Those were deterministically built so you can check the checksums at https://github.com/bitcoin/gitian.sigs under 0.12.0 and check that the downloaded file's hash matches the signed hashes of all of the people who have done gitian builds.


Title: Re: Making a BTC node hidden service?
Post by: chek2fire on February 20, 2016, 05:20:44 PM
and what the benefits to run a node under tor? Network need nodes like this. If yes i will setup my nodes to run under tor but i dont know if after that the slow relay will be good for the bitcoin network


Title: Re: Making a BTC node hidden service?
Post by: Jet Cash on February 20, 2016, 05:24:34 PM
and what the benefits to run a node under tor? Network need nodes like this. If yes i will setup my nodes to run under tor but i dont know if after that the slow relay will be good for the bitcoin network


It might give more ammunition to unsympathetic governments and bankers.


Title: Re: Making a BTC node hidden service?
Post by: chek2fire on February 20, 2016, 05:30:24 PM
but someone who want to hide his ip he can simple run bitcoin core wallet under tor especially with the newest 0.12 version. Then he can connect to a normal node even if this node is a part of a sybil attack.


Title: Re: Making a BTC node hidden service?
Post by: Jet Cash on February 20, 2016, 05:33:41 PM
but someone who want to hide his ip he can simple run bitcoin core wallet under tor especially with the newest 0.12 version. Then he can connect to a normal node even if this node is a part of a sybil attack.

The way things are going at the moment, Bill Gates and Google will know about it. :)


Title: Re: Making a BTC node hidden service?
Post by: achow101 on February 20, 2016, 11:04:04 PM
and what the benefits to run a node under tor? Network need nodes like this. If yes i will setup my nodes to run under tor but i dont know if after that the slow relay will be good for the bitcoin network

Well for people who can't connect to the normal Bitcoin network due to censorship, running Bitcoin Core over Tor allows them to circumvent that censorship. With a hidden service, they can also receive incoming connections. Otherwise the connections over Tor are only outgoing connections.