3

enter image description hereIf I use my

geth --identity "MyNodeName" --rpc --rpcport "8545" --rpccorsdomain "*" 
--datadir Users/xxxx/TestChain1 --port "30303" --rpcaddr 
"127.0.0.1"  --nodiscover --rpcapi "db,eth,net,web3,personal" -- 
networkid 123 init /Users/xxxx/CustomGenesis.json


 geth --identity "MyNodeName" --rpc --rpcport "8545" --rpccorsdomain 
 "*" --datadir Users/xxxx/TestChain1 --port "30303" --nodiscover -- 
 rpcapi "db,eth,net,web3,personal" --networkid 123 console

Everything works fine. But if I change rpcaddr "127.0.0.1" to a static address like 129.215.199.18 and run the above code, i will get the following warning in geth:

Failed account unlock attempt            
address=0x621C385fe616fBe096322E71d6f02631d520C1Ca 
err="could not decrypt key with given passphrase"

Note that this is the only account I had. Even if I try to unlock my account once I keep getting the above warning. It also prevents me to deploy the contract to the blockchain if I use remix and metamask. But I will not have any issue if I use rpcaddr "127.0.0.1" in the above command line.

Also, when I send only one transaction via geth, the console keeps saying that a transaction has been submitted.

enter image description here

Question: What is the problem?

2 Answers 2

3

This is a brute-force attack against your password. Besides potentially stealing all of your ETH, descryption is relatively expensive computationally and could be a DOS vector.

You should never expose the personal API to the open internet. Consider disallowing external connections by setting your rpcaddr and rpccorsdomain to localhost. Even better, use IPC instead of RPC if your connection is local.

2
  • thanks for the answer. I'm developing a smart contract and user interface for that. Ultimately I want external users to connect to it and use it. I need to tell to the users my static IP, so they can connect via a wallet like metamask. Therefore, my question is: how can I set my blockchain security and prevent those attacks?
    – Aydin
    Commented Feb 28, 2019 at 9:52
  • You can ask another question if you want more specifics, but the gist is that you should only set --rpcapi "eth,web3" You should definitely not expose personal Commented Feb 28, 2019 at 16:15
2

Sure, this is brute-force attack trying to unlock an account and send out a transaction. Never never never open up rpc port in public.

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.