bitcoind is refusing to connect to my other server
Asked
Active
Viewed 679 times
1 Answers
0
By default bitcoind only binds RPC to the loopback interface, so you can only connect to it from localhost. This is for security.
You can allow connections from a specific other machine with -rpcallowip, or in general with -rpcbind, but beware that this substantially increases the attack surface. Moreover, the data sent and received is not encrypted, see Why is JSON-RPC over SSL "strongly discouraged"?.
It's recommended instead to use VPN software to set up a tunnel between the two machines. In such a setup, bitcoind will see the RPC connection as coming from localhost.
Nate Eldredge
- 22,970
- 3
- 39
- 80
-
I will try this soon. Thanks. I am running bitcoind on a VPS. I am not sure exactly what you are saying in the last part, but do you mean you recommend running bitcoind and the site on the same server? – 2523454 Feb 07 '18 at 12:52
-
@2523454: You can do that, and it might be simpler, but it's not what I'm talking about. I'm saying you can set up a [virtual private network](https://en.wikipedia.org/wiki/Virtual_private_network) such that communications from the remote server are forwarded over an encrypted connection, and it's the VPN software on the bitcoind server that actually talks to bitcoind. Pretty standard network admin stuff. – Nate Eldredge Feb 07 '18 at 15:18
-
I already am running it on a VPN. I have 2 VPNs, one for website one for daemon. – 2523454 Feb 07 '18 at 16:26
-
I suspect you mean **VPS** (virtual private server) not VPN. You would need to set up a VPN between the two VPSes. How to do this is beyond the scope of this site. – Nate Eldredge Feb 07 '18 at 16:33
-
Yes, I meant VPS. I'll try the -rcpallowip flag in about a hour and accept this if it works. – 2523454 Feb 07 '18 at 18:38