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 ?

1 Answer 1


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.
    – user2607
    Sep 12, 2016 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. Sep 12, 2016 at 11:17

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.