I have a machine (A) running a Tezos node, with RPC port set to 8732
. Its local IP is 192.168.1.200
.
I have another machine (B), from the same network, from which I'd like to connect to the RPC of A.
On machine A I opened port 8732:
sudo iptables -A INPUT -p tcp --dport 8732 -j ACCEPT
sudo /sbin/iptables-save
Now, machine B should be able to do an RPC connection like this:
tezos-client --endpoint http://192.168.1.200:8732 rpc get /chains/main/blocks/head/protocols
But what it gets is:
Warning:
Failed to acquire the protocol version from the node
Rpc request failed:
- meth: GET
- uri: http://192.168.1.200:8732/chains/main/blocks/head/protocols
- error: Unable to connect to the node: "Unix.Unix_error(Unix.ECONNREFUSED, "connect", "")"
Error:
Rpc request failed:
- meth: GET
- uri: http://192.168.1.200:8732/describe/chains/main/blocks/head/protocols?recurse=no
- error: Unable to connect to the node: "Unix.Unix_error(Unix.ECONNREFUSED, "connect", "")"
What did I do wrong? Do I have to set up a web server (nginx?) to handle the incoming HTTP request?