I got vps with ubuntu 18.04 with ssh access and bitoind set up on it. This is my bitcoin.conf file:
testnet=1
prune=35840
maxconnections=12
muxuploadtarget=20
daemon=1
server=1
rpcclienttimeout=5000
rpcuser=[usr]
rpcpassword=[psw]
rpcallowip=0.0.0.0/0
This is my rpc call:
curl --data '{"jsonrpc":"2.0","method":"getwalletinfo","params":[]}' http://[usr]:[psw]@localhost:18332
When it given in vps terminal, that return json response just like it meant to be, but when i got this request on another machine:
curl --data '{"jsonrpc":"2.0","method":"getwalletinfo","params":[]}' http://[usr]:[psw]@[myvpsip]:18332
terminal returns:
curl: (7) Failed to connect to [myvpsip]: Connection refused
This is my result for "sudo netstat -tuwpln" on vps, pasted results only with bitcoind: :
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:18332 0.0.0.0:* LISTEN 2027/bitcoind
tcp 0 0 0.0.0.0:18333 0.0.0.0:* LISTEN 2027/bitcoind
tcp6 0 0 ::1:18332 :::* LISTEN 2027/bitcoind
tcp6 0 0 :::18333 :::* LISTEN 2027/bitcoind
Already checked firewall and it has Status: inactive. Iptables also empty. Got connection over ssh, so server is able. Also pinged well. I still think that problem is in bitcoin.conf but don't know exactly where is it. Can anyone help solving this problem? I would be really greatful
P.S. Writing script on python and one part of it is bitcoin payments, so really need solution for this. If there easier way for payments would like to familirize.