5

If I create a new Ethereum blockchain using a new genesis block and network id, is it possible to restrict the access to it only to specific nodes?

In other words, can I avoid that undesirable nodes with the same genesis block and same network id attach to my blockchain?

1

Network parameters do not authenticate or authorize nodes joining the network. Anybody can join your network as long as they know IP address of your node.

There are couple of EVM implementations with proper node authentication and authorization

  • 1
    if we put maxpeer=2 and we add 2 nodes is it possible for a third party to join the network and synch? – Etherkimist Dec 16 '16 at 19:41
  • I would say "yes", but because of network connectivity issues, denial of service attacks and nodes rebooting this would be very, very, insecure and could be hacked in in couple of minutes. – Mikko Ohtamaa Dec 22 '16 at 15:14
  • You can also check Pantheon. It supports local and onchain permissioning. – Deniz May 16 at 17:47
2

yes, you could setup your private chain and indicate which nodes are allowed to connect to your blockchain.

1-define the same genesis file and the same network id.

2-use the following options to restrict the allowed node :

--nodiscover : Use this option to make sure that your node is not discoverable by people who do not manually add you.

--maxpeers value Maximum number of network peers (network disabled if set to 0) (default: 25)

you could also define the desired nodes on geth boot using :

--bootnodes value Comma separated enode URLs for P2P discovery bootstrap

or do it after geth launch by using admin.addNode()

you could check the connected node using admin.peers

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.