Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: xtpu on May 22, 2014, 04:24:09 AM



Title: bitcoind - 0 connections on Debian (searched all over for answer, no luck)
Post by: xtpu on May 22, 2014, 04:24:09 AM
I'm running bitcoind on a remote server (so I can only use the "headless" version). However, the client is not connecting to the bitcoin network. The "getinfo" command shows "connections: 0".

Here's what my bitcoin.conf looks like:
Code:
daemon=1
server=1
rpcuser=<redacted>
rpcpassword=<redacted>
rpcport=<redacted>
rpctimeout=60

Port 8333 is open for UDP traffic in my firewall and I have used an external port scanner to verify that it is open. However, I understand that that's not actually necessary for outgoing connections. I've also checked that my date / time is synchronized (this was suggested in some of the threads that I found on this topic).

What are other possibilities?

Edited to Add: This a Debian setup. Most things Ubuntu should apply as well.


Title: Re: bitcoind - 0 connections on Debian (searched all over for answer, no luck)
Post by: shorena on May 22, 2014, 05:57:59 AM
Try adding a node by hand. Here is a list of known nodes: https://en.bitcoin.it/wiki/Fallback_Nodes

Edit: also open 8333 TCP, not UDP


Title: Re: bitcoind - 0 connections on Debian (searched all over for answer, no luck)
Post by: xtpu on May 22, 2014, 03:12:35 PM
Have definitely tracked it down to a firewall issue. As soon as I disable the firewall, it connects fine, but what should the correct firewall rules be?

Currently, I have my OUTPUT policy set to ACCEPT (less risky, easier to work with).

In my input policy I have the following rule:
Code:
-A INPUT -p tcp --dport 8333

I know that I typed UDP before, but I actually meant TCP.


Title: Re: bitcoind - 0 connections on Debian (searched all over for answer, no luck)
Post by: shorena on May 22, 2014, 05:57:50 PM
Have definitely tracked it down to a firewall issue. As soon as I disable the firewall, it connects fine, but what should the correct firewall rules be?

Currently, I have my OUTPUT policy set to ACCEPT (less risky, easier to work with).

In my input policy I have the following rule:
Code:
-A INPUT -p tcp --dport 8333

I know that I typed UDP before, but I actually meant TCP.

looks like you are missing an -j ACCEPT here.

Tipp: If you are affraid of DDoS you could modify this

http://togami.com/~warren/archive/2013/example-bitcoind-dos-mitigation-via-iptables.txt

Its a nice way to limit connections from a certain IP range.


Title: Re: bitcoind - 0 connections on Debian (searched all over for answer, no luck)
Post by: zvs on May 22, 2014, 06:13:47 PM
he said he had 0 connections, so it's not even opening any outbound connections.  firewall concerns would come after that (unless you're in some environment w/ a firewall that blocks various outgoing connections), if you were able to establish outgoing connections but nothing incoming, then you just check telnet 127.0.0.1 8333 or w/e, see if it's open or not.

but, anyway, try addnode=5.9.24.81 at the bottom of your .conf file

also, ufw is easier to use if you're having issues with iptables