5

I am trying to get geth to synchronize behind my office firewall. I have a TCP and UDP port opened (incoming and outgoing) as requested in other similar threads, but it doesn't seem to be enough. Specifically, I can listen for peers correctly but then geth attempts to connect to them using different TCP ports, which are obviously blocked by the firewall; netstat shows that these connections are stuck at SYN_SENT, as shown below.

netstat -b
[...]
[geth.exe]
  TCP    xxx.xxx.xxx.xxx:64801   ip2504fbb9:30303       SYN_SENT
[geth.exe]
  TCP    xxx.xxx.xxx.xxx:64802   185.31.136.69:30303    SYN_SENT
[geth.exe]
  TCP    xxx.xxx.xxx.xxx:64803   95.85.21.43:30303      SYN_SENT
[geth.exe]
  TCP    xxx.xxx.xxx.xxx:64804   wallets:30303          SYN_SENT
[...]

Am I actually correct that more ports need to be open for geth to work? Is there a way to specify a range?

4

To only download data from other nodes, you don't need to open any outgoing ports at all. Opening your :30303 to the world is required only if you want to run full node, helping other people to use Ethereum.

So the only thing you need - is to allow incoming connections to your host, almost all firewalls allow that by default(or you wouldn't be possible for you to open any sites). Some firewalls may disallow incoming connections from non standard ports(not 80/443), check that incoming connections like 1.2.3.4:30303 are allowed

1

There is a workaround for this. Once you run your geth or testrpc on your http://localhost:8545, use ngrok to expose the service to randomly generated ngrok url.

$ ngrok http 8545

it generates a url like https://randomNumbers.ngrok.io. This url can be used as a web provider. I was able to test this on Remix browser and working perfectly fine.

  • That is not an answer to the question that I asked. I can access the rpc service alright - it's running on my machine. The problem is that geth is not able to connect to peers to download the blockchain because it's sitting behind a firewall. – manuhalo Sep 24 '17 at 7:41

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.