0

Is there any way to connect NOT LOCAL node to running private Blockchain? So, there are 3 virtual machines in one local network. They are syncronized private blockchain. They have static-nodes.json and same genesis.json. One of this virtual machines has connection to Internet and mapping from port 8545 from white IP to local IP address. I want to connect there one more node, but this node is not in local virtual machines's network. Is there any chances to do it? Maybe some parameters rpcallow and so on? Hope, somebody can help me and clarify this question.

Thanks!

  • you have two options, ether running a bootnode process or adding peers manually with admin.addPeer() – Nulik Jun 8 '18 at 13:37
  • RPC is for clients that want to use the node, but it is not for connecting nodes, nodes are connected using Ethereum 63 protocol – Nulik Jun 8 '18 at 13:38
  • But how can I do this? – Albin Jun 8 '18 at 13:45
  • geth --networkid 57 --fast --datadir "~/Blockchain4" --rpc --rpcapi "admin,personal,db,eth,net,web3" --rpcport "8545" --rpcaddr "195.182.149.109" --rpccorsdomain "*" --mine --unlock 0 --password ~/Blockchain3/password.sec --ipcpath "~/Blockchain4/geth.ipc" Here is my command. If I put there rpc address like whire IP of one of the virtual machines - there is an error. Node I need to connect is not in local network, and I have no idea, how to do it already. – Albin Jun 8 '18 at 13:46
0

One of this virtual machines has connection to Internet and mapping from port 8545 from white IP to local IP address.

Are you confusing the RPC port with the TCP/UDP port in your local re-mapping of ports?

8545 is the port typically used for RPC connections, specified with --rpcport "8545" when you start up geth. However, the port used typically for TCP/UDP (i.e. connecting with peers) is "30303", specified with --port "30303" when you start up geth.

I suspect you should be re-mapping 30303 instead of 8545.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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