1

I am running a bitcoin rpc server on my raspi and I can connect to it using local bitcoin-cli, but not externally from a windows on the same LAN. I tried installing ufw and disabling firewall on my raspi, and allowed tcp and udp connection to remote port 8332 on my windows, but that didn´t work. I can ping my raspi´s api from windows, but I can only get response from pinging my windows from raspi if I disable windows´ firewall. I don´t know what else to do.

I just noticed that if I put -rpcconnect=192.168.0.114 on bitcoin-cli argument it doesn´t connect, but if I put 127.0.0.1 it connects, and I am certain of the raspi´s ip is 192.168.0.114 from ifconfig result and also from ssh connection ( which works )

Badjano
  • 189
  • 1
  • 7

1 Answers1

2

I just found out that I need these lines on bitcoin.conf to access rpc from outside localhost:

rpcbind=192.168.0.114

rpcallowip=0.0.0.0/0

or start bitcoind or bitcoin-qt with -rcpbind=xxx and -rpcallowip=xxx

Apparently if you don´t bind your ip to your lan ip, it will only work with local connections, and rpcallowip=0.0.0.0/0 is not recommended because it opens up for anyone to connect, so I´ll probably change that but if you don´t, make sure your password is secure enough.

Badjano
  • 189
  • 1
  • 7