Author

Topic: Problem connecting to other peers when also using tor (Read 1987 times)

member
Activity: 80
Merit: 10
Sorry, I don't know enough about tor and how Bitcoin interacts with tor to help you troubleshoot more than that. Also, my .onion node won't always be available -- it's pretty much just when my computer is on. (also, the wiki is often wrong or outdated, unfortunately.)
legendary
Activity: 1974
Merit: 1029
If I'm understanding you correctly, you're trying to have a node that listens on and connects to IPv4 peers over the internet, and hidden service peers over Tor?

Correct!


If so, what you want isn't the proxy option, as that's "make this my proxy for all traffic". You want the tor option (in 0.8.x) or the onion option (in later versions, i.e. git head).

That was it, thank you. I disregarded that option because the doc says "If you only want to use Tor to reach onion addresses" and I didn't think I would be reachable from tor.

I tried to connect to your node and a bunch of other ones (those among https://en.bitcoin.it/wiki/Fallback_Nodes that I was able to connect via telnet) but didn't see messages like "connected" or "send version message" in the debug.log, instead I got "Error reading proxy response". Oh well.
member
Activity: 80
Merit: 10
If I'm understanding you correctly, you're trying to have a node that listens on and connects to IPv4 peers over the internet, and hidden service peers over Tor?

If so, what you want isn't the proxy option, as that's "make this my proxy for all traffic". You want the tor option (in 0.8.x) or the onion option (in later versions, i.e. git head).

Here's my configuration, for example:

Code:

externalip=c7nvv7pgmbitcoin.onion
discover=1 # figure out what my external address(es) are, despite already having specified one or more
listen=1
tor=127.0.0.1:9050
legendary
Activity: 1974
Merit: 1029
With this configuration:

Code:
rpcuser=user
rpcpassword=pass
txindex=1
logtimestamps=1
dbcache=50
par=-1

## tor stuff
#proxy=127.0.0.1:9050
#externalip=blahblah.onion
externalip=my.ip.addy.here
listen=1

my bitcoind 0.8.6 works as usual, I'm able to connect to other peers and I see others can contact me too:

Code:
$ bitcoind getinfo |grep conn
    "connections" : 13,
$ grep -c accepted.con .bitcoin/debug.log
5

Now, if I uncomment that couple of lines in bitcoind.conf, this is all I get in the log:

Code:
2013-12-18 18:26:47 init message: Loading addresses...
2013-12-18 18:26:47 Loaded 12642 addresses from peers.dat  33ms
2013-12-18 18:26:47 mapBlockIndex.size() = 275764
2013-12-18 18:26:47 nBestHeight = 275666
2013-12-18 18:26:47 setKeyPool.size() = 101
2013-12-18 18:26:47 mapWallet.size() = 0
2013-12-18 18:26:47 mapAddressBook.size() = 1
2013-12-18 18:26:47 net thread start
2013-12-18 18:26:47 addcon thread start
2013-12-18 18:26:47 dnsseed thread start
2013-12-18 18:26:47 Loading addresses from DNS seeds (could take a while)
2013-12-18 18:26:47 0 addresses found from DNS seeds
2013-12-18 18:26:47 dnsseed thread exit
2013-12-18 18:26:47 opencon thread start
2013-12-18 18:26:47 trying connection seed.bitcoin.sipa.be lastseen=0.0hrs
2013-12-18 18:26:47 dumpaddr thread start
2013-12-18 18:26:47 msghand thread start
2013-12-18 18:26:47 connect() failed after select(): Connection refused
2013-12-18 18:26:47 init message: Done loading
2013-12-18 18:26:47 trying connection 80.2.93.47:8333 lastseen=4.1hrs
2013-12-18 18:26:47 connect() failed after select(): Connection refused
2013-12-18 18:26:47 trying connection dnsseed.bluematt.me lastseen=0.0hrs
2013-12-18 18:26:47 connect() failed after select(): Connection refused
2013-12-18 18:26:48 trying connection 166.48.53.198:8333 lastseen=0.1hrs
2013-12-18 18:26:48 connect() failed after select(): Connection refused
2013-12-18 18:26:48 trying connection dnsseed.bitcoin.dashjr.org lastseen=0.0hrs
2013-12-18 18:26:48 connect() failed after select(): Connection refused
2013-12-18 18:26:48 trying connection 94.137.223.195:8333 lastseen=10.7hrs
2013-12-18 18:26:48 connect() failed after select(): Connection refused
2013-12-18 18:26:48 trying connection bitseed.xf2.org lastseen=0.0hrs
2013-12-18 18:26:48 connect() failed after select(): Connection refused
2013-12-18 18:26:49 trying connection 89.176.52.88:8333 lastseen=4.4hrs
2013-12-18 18:26:49 connect() failed after select(): Connection refused
2013-12-18 18:26:49 trying connection seed.bitcoin.sipa.be lastseen=0.0hrs
2013-12-18 18:26:49 connect() failed after select(): Connection refused
2013-12-18 18:26:49 trying connection 41.177.216.164:8333 lastseen=5.3hrs
2013-12-18 18:26:49 connect() failed after select(): Connection refused
2013-12-18 18:26:49 trying connection dnsseed.bluematt.me lastseen=0.0hrs
2013-12-18 18:26:49 connect() failed after select(): Connection refused
2013-12-18 18:26:50 trying connection 77.254.129.102:8333 lastseen=14.7hrs
2013-12-18 18:26:50 connect() failed after select(): Connection refused
2013-12-18 18:26:50 trying connection dnsseed.bitcoin.dashjr.org lastseen=0.0hrs
2013-12-18 18:26:50 connect() failed after select(): Connection refused
2013-12-18 18:26:50 trying connection 195.135.239.7:8333 lastseen=2.2hrs
2013-12-18 18:26:50 connect() failed after select(): Connection refused
2013-12-18 18:26:50 trying connection bitseed.xf2.org lastseen=0.0hrs
2013-12-18 18:26:50 connect() failed after select(): Connection refused
2013-12-18 18:26:51 trying connection 46.4.121.100:8333 lastseen=0.1hrs
2013-12-18 18:26:51 connect() failed after select(): Connection refused
2013-12-18 18:26:51 trying connection seed.bitcoin.sipa.be lastseen=0.0hrs
2013-12-18 18:26:51 connect() failed after select(): Connection refused
2013-12-18 18:26:51 trying connection 76.247.187.13:8333 lastseen=6.3hrs
2013-12-18 18:26:51 connect() failed after select(): Connection refused
2013-12-18 18:26:51 trying connection dnsseed.bluematt.me lastseen=0.0hrs
2013-12-18 18:26:51 connect() failed after select(): Connection refused
2013-12-18 18:26:52 trying connection 75.84.254.121:8333 lastseen=4.6hrs
2013-12-18 18:26:52 connect() failed after select(): Connection refused
2013-12-18 18:26:52 trying connection dnsseed.bitcoin.dashjr.org lastseen=0.0hrs
2013-12-18 18:26:52 connect() failed after select(): Connection refused

And so it remains ad infinitum.

If I add 'onlynet=ipv4' nothing changes. If I add 'onlynet=tor' (so I end up with two "onlynet" lines) nothing changes again.

I get incoming connections on ipv4, and if  I try a 'torsocks telnet' to my onion address I seem to suceed too. However the fact that I'm unable to connect to other nodes bothers me. I know bitcoind is trying to connect to the outside via tor because I set up a rule in my firewall to accept SYN packets on the loopback interface and I see that the packet count increases when bitcoind is running, stops when it's not. So, how can I tell bitcoin to ignore the proxy when trying to connect to non tor nodes?
Jump to: