5

Can you tell me the differences between

--rpcaddr 127.0.0.1

--rpcaddr 0.0.0.0

--rpcaddr my_public_ip

--rpcaddr my_private_ip

during a private network config?

Thank you

1
  • That's more a networking question. If you don't know what is 127.0.0.1 then you have to read TCP/IP guide.
    – Nulik
    Commented Apr 6, 2018 at 17:51

1 Answer 1

11

--rpcaddr 127.0.0.1 starts the JSON RCP on the localhost network and only connections from your local machine reach the geth server

--rpcaddr 0.0.0.0 starts the JSON RPC on all interfaces and any network can initiate the connection to your geth server

If you need to allow connections only from the localhost network you should use 127.0.0.1

If you need to allow connections from your local network you should use your network ip (usually something like 192.168.1.1)

If you're going to use 0.0.0.0 anybody can connect to your server

1
  • 1
    Can you set multiple IPs by repeating --rpcaddr like this: --rpcaddr localhost --rpcaddr 10.20.30.40? Commented Jan 23, 2020 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.