2

Is it possible to connect two private ethereum nodes that are connected to different internet service providers? I have tried and successfully connected the nodes over same network and it works.

How to connect two nodes that are not using same network, what IP do I need to replace after enode ?

2

You would need the public IP for a start. But your main issue may in fact be the port to connect to.

I assume that both your nodes are behind their own NATs. Can you forward a port (say XX) from the router to the port 30303 of your nodes? Then when you have the admin.nodeInfo.enode, you replace the port 30303 with XX, and [::] with the public IP address. Then do admin.addPeer(ENODE) on the other machine.

  • Can you please elaborate, unable to figure how to forward a port from the router. Can you help me with a step by step account of things to be done. – jassu Sep 12 '16 at 10:45
  • Step by step depends on your router model, supposing you are at home or in office: wikihow.com/Set-Up-Port-Forwarding-on-a-Router. Alternatively, you would put your node on a cloud-service computer, which typically let you attach a public IP to the computer itself. – Xavier Leprêtre B9lab Sep 12 '16 at 11:17

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.