With this configuration:
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:
$ 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:
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?