3

My setup is as follows: Windows host machine running an Ubuntu VM using virtual box. On the Ubuntu VM i'm running a private ethereum cluster using docker. This is working fine. I'm connecting them using a bootnode and this works instantly. No add-peer necessary.

What I'm trying to do now is connect a local node on my windows machine to the cluster. I want to run Mist locally for demo purposes, but also setup something of an easy to use local deployment environment.

In virtualbox I can either use a bridged network or nat. If I use a bridged network, it just works. I can connect my windows hosted node and Mist to the cluster. But I need to get it to work using nat.

I've basically tried everything and nothing works. Latest attempts included using --nat extip:[ubuntu_vm_ip]. Also did not work.

I then decided to run a node on the Ubuntu VM itself (so not using docker). This did not autosync, but by using addpeer I could actually get it to connect from my host.The docker nodes not so much. I found this post on connecting nodes on a different network, but the setup is somewhat different in my case. I'm not sure which nodes I need to provide with the --nat extip flag (and which address to use). It looks like that the connection to the bootnode and the direct connection to the nodes simply isn't working.

To provide some details: My docker bootnode is using port 30301 and it's exposing it to the ubuntu host, both tcp and udp. My docker ethereum nodes are exposing 30303/udp and 8545 tcp. In the virtualbox nat networking settings I'm forwarding all these ports.

connected peers on ubuntu node

I'm wondering, looking at the above image, what the random port numbers are on the localnode/remote node under network settings.

So I know this is a bit of stretch and there are similar questions out there, but any hints, thoughts or experience is very welcome. I've been working on this for days and days, super frustrating.

I plan on sharing everything on github when done btw, for those interested.

EDIT: using host-only networking I can also use addPeer to connect a node without any issue, but peer discovery will not work. btw: I have diabled the firewall on the windows host.

So the question boils down to: why is peer discovery working on a bridged network and not on host-only or NAT, and where do I need to apply network changes? Expose more ports on my node containers (I tried all the usual suspects and have configured port forwarding). start geth using --nat extip:[someurl]

0

Ok, so this is solved. Turns out, ofcourse, I made a stupid error.

When using NAT, i'm making the guest machine available over 127.0.0.1 and using port forwarding in the VirtualBox NAT networking settings. Forwarding port 30303 - the port my docker nodes are using- basically occupies this port on my local machine. As I also ran my windows node on this port, discovery would never work. (addPeer still works though)

I switched my local node to run on a different port and it worked immediatly...

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.