I am building a private chain and rpcaddr is set to
But recently I found out that this private chain has been attacked by a foreign IP, it kept trying to transfer those worthless ether out from my account.
The only external connection I need is connection to Metamask, so I was wondering is there any way that the geth only allow metamask to connect, while rpcaddr is set to localhost?

bumped to the homepage by Community yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • how about to use address? – user55524 Aug 21 at 8:57

What you need to do is pass --rpccorsdomain="metamask extension url" as well from your geth console.
Check this post to see how to do: https://metamask.zendesk.com/hc/en-us/articles/360015290012-Using-a-Local-Node

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.