In a private blockchain, a new node cannot get automatically connected to the private network. That's why the network is private
.
Regarding authentication, the unique --networkid
of your network and your genesis
file act as a first level of authentication factors to your private blockchain network. In other words, a new node cannot be added to the network unless it has a copy of the genesis
file and knows the networkid
.
Even if a node is aware of both these attributes, it won't be a part of the private network unless it's manually added (through it's enodeURI
) as a peer to one of the nodes (of the private network) through the addPeer()
function. There is no automatic peer discovery in a private blockchain networkThere is no automatic peer discovery in a private blockchain network.
If you think that all the aforementioned tasks could be possibly carried out by an attacker, you can enable the --nodiscover
option and use the --maxpeers
option to limit the no. of connections.