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
  TCP    xxx.xxx.xxx.xxx:64801   ip2504fbb9:30303       SYN_SENT
  TCP    xxx.xxx.xxx.xxx:64802    SYN_SENT
  TCP    xxx.xxx.xxx.xxx:64803      SYN_SENT
  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?


2 Answers 2


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 are allowed

  • 4
    Uhm. Mixed from/to here? Incoming means: from the internet to your local system. Any firewall blocks that by default. Outgoing: from your local system to the internet. Most firewalls allow that by default.
    – omni
    Nov 22, 2020 at 18:08

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.

  • 1
    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, 2017 at 7:41

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.