I have created a private chain in Geth which is running in machine1
. I want to connect to the private chain running in machine1
from machine2's
Metamask using rpc. machine1
and machine2
are connected to the same Wifi network.
The IP address of machine1
is 192.168.0.103 and I am opening port number 8501 for RPC connections.
The following are the flags that I have used to start Geth in machine1
:
geth --datadir "C:\Users\smuth\Desktop\GETH DAPP POA\node1" --port 30311 --http --http.addr "192.168.0.103" --http.port 8501 --http.corsdomain "*" --http.api "personal,db,eth,net,web3,txpool,miner" --networkid 1515 console --ipcdisable --nat extip:192.168.0.103
I tried using the rpc url http://192.168.0.103:8501 and chain ID as 1515 in Metamask of machine2
. But Metamask doesn't connect and displays the error : "Could not fetch chain ID. Is your RPC URL correct?"
The console log of Metamask displays a timed out HTTP POST request to the RPC URL (http://192.168.0.103:8501)
A similar question is posted here: MetaMask and Access Ethereum Private Chain from other PC in the same network (for test)
But the solutions for the above question does'nt work for me.
What could be changed to make this connection work?