I have a private PoA network with 3 geth nodes, i connect them using addPeer and create p2p network, each node is connected with the rest of them
Now i want to create a bigger network, with 20 nodes, so i need to connect to the geth console and invoke the addPeer 20 x 20 = 400 times ..
obviously this is unstable.
I know there is an option to do this automatically, connecting the nodes to discovery/bootnodes, but i cant use a bootnode. Why? because bootnodes dont filter connections from the outside, so any hacker/malicious user could try to connect to my bootnode.
See this related issue: https://github.com/ethereum/go-ethereum/issues/16057
So, what i have in mind to research is:
- Maybe i can create a bash script that connects to geth console and executes the addPeer too many times as nodes present but i want to know if there is any better approach
- Maybe there is a way to add firewall rules to the bootnode , something like "only allow connections to the bootnode from the IPs of the 20 geth nodes". I dont know if this is possible without affecting the discovery protocol
Any thoughts about this scenario?