0

Basically I would like to know how to configure geth so that it can only connect to my private ethereum blockchain that is hosted on another machine?

Many thanks in advance!

2
  • will this be helpful ethereum.stackexchange.com/q/28200/16301 Commented Oct 30, 2018 at 13:29
  • That would be one solution using MetaMask. However, I would like to use geth instead of MetaMask and configure it so that it can only connect to my private bc and no others.
    – JJR
    Commented Oct 30, 2018 at 14:15

1 Answer 1

0

geth can only connect to one blockchain. Unless you pass a different port and a different path for the data directory.

to connect to your private blockchain just get the enodes addresses and the machine external ip (ports should be opened) and pass it in geth

for example

geth --datadir ~\.space --networkid 1337  --bootnodes=enode://42aa0f3f526ed619032e0c1b3526e15b20df4dc0229f9a6f991e6f31d86561dfb2d5d14d36dcaa29867a31709ab0d7e0fc868eb6d7dde344116318386aeb87d5@YOUR_EXTERNAL_IP:30304 --rpc --rpcapi admin,db,eth,net,web3,personal,txpool --shh --ws --rpcaddr localhost --rpcport 8545 --rpccorsdomain "*"
2
  • I get this step. But what I would like to achieve is to configure geth so that it can connect to one and only one blockchain, which is my private one. In other words, I don't want the following situation to happen: that I start geth and connect to one blockchain and the next time I start geth again I connect to another blockchain. Basically, what I would like is to configure Geth on my computer so that it can only connect to one chain and one chain only, which is my private blockchain.
    – JJR
    Commented Oct 30, 2018 at 14:23
  • well you put the starting script in a ... sh script and start it only from there. other option is to fork geth and put some constraints there..
    – OWADVL
    Commented Oct 30, 2018 at 16:18

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.