3

Suppose I have two EC2 instances on AWS that are running geth nodes. They have the same genesis block and are in synchronization because peering is setup with open port 30303 (by default is for peering among nodes).

What would be potential issues with this setup? Wouldn't others be able to access from outside the network by hitting the open ports?

Also any issues with scaling?

1
  • Could a VPC be used to resolve this problem? Commented Jan 20, 2018 at 19:58

2 Answers 2

1

As you say if your nodes are listening on the internet then other nodes would be able to communicate with yours. If they knew the genesis settings they could actually mine in your network, and if you have an open JSON-RPC port and they had gas on the network they could send transactions.

The solution is to restrict access at the network level, so your nodes can only talking to each other on the relevant ports, and do not accept access from other nodes. There are a few ways to do this:

  • Create firewall rules using AWS security policies
  • Create firewall rules on your EC2 instances, eg with iptables
  • Use a VPN
  • Make the nodes listen only on localhost, and connect them using SSH tunnels
2
  • Could you address the scaling portion of the question? Commented Jan 23, 2018 at 18:33
  • Afraid not, it's too vague. I mean, if you have more traffic than the biggest AWS nodes can handle, you'll have problems with scaling. Commented Jan 24, 2018 at 3:49
0

I believe that you can also set --maxpeers <n> with n being the size of your private network to keep intruders from accidentally or intentionally joining your network.

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.