I have geth running on local network (separate machine). curl'ing to http://localhost:8545 works just fine. How do I curl to that geth node from another machine on my private network? Curling to http://10.x.x.x:8545 just returns connection refused.
geth itself is all up and running on the other 10.x.x.x machine just fine and geth attach, curl, etc all work on localhost on that box.
e.g. this works:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' http://localhost:8545
result: ➜ {"jsonrpc":"2.0","id":67,"result":"Geth/v1.9.17-unstable-5b081ab2-20200714/darwin-amd64/go1.13.6"}
this fails (from another machine on that private network):
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' http://10.x.x.x:8545
result ➜ curl: (7) Failed to connect to 10.x.x.x port 8545: Connection refused
(using real IP's instead of x's of course)
Both nodes communicate just fine otherwise (ssh, browse websites, file sharing, etc...)