I have a node on the Linux server.
And I can call RPC from the server.
But I can’t call from my computer to the node by IP.
curl --user admin --data-binary ‘{“jsonrpc”: “1.0”, “id”:“curltest”, “method”: “z_listaddresses”, “params”: }’ -H ‘content-type: text/plain;’ http:// 35.21.21.11:18232/
return error message: Failed to connect to 35.21.21.11port 18232: Connection refused
And I checked the port and see:
ubuntu@instance-1-zcash-testnet:~$ netstat -tulpn | grep 18232
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1 :18232 0.0.0.0:* LISTEN 1172/zcashd
tcp6 0 0 ::1:18232 :::* LISTEN 1172/zcashd
Does your cloud provider have its own firewall settings that you need to configure to allow incoming data to 18232? On AWS this would look like an issue with the security group
Using the RPC port over a remote interface is not really recommended, because that will cause the rpcpassword to be transmitted over the network unencrypted, allowing any observer to steal your keys + Zcash and take over the OS account running zcashd.
with that said, you can modify your zcash.conf file and add rpcallowip cofig.
rpcallowip=172.17.0.0/16
the IP Address should be added in the CIDR notation.
Thank you for your answer!
if it is not really recommended
So how do I can create new address, check balance, transfer from my server(api)?
the zcash node is a private node of our server.