Closed ekkis closed 8 years ago
well... if I run the daemon with -logips
and make my attempt I see:
2016-07-09 18:32:26 Received a POST request for / from 172.17.0.1:50262
instead of the IP address I expected. I gather it's the IP address of the VM that Docker runs, that somehow gets routed to the container. so now the question is: how do I discover that IP address from my node app so I can whitelist it?
and... (drumroll) the answer seems to be that I can pick it up from the docker inspect
NetworkSettings.Gateway
key. but... in fact, I can bake it into the CLI because for this image the gateway is always the same
@ekkis are you able to solve this problem, I am running my docker image on was and trying to connect with it. While the RPC client method of bitcoin-core gives me a 403 Forbidden error I am able to connect with same port with telnet.
const wallet1 = new Rpc_client({
network: 'regtest',
username: 'someusername',
wallet: 'somewallet.dat',
host : '1X.1X1.X3X.2X7',
port : '18332',
password: 'somepassword',
});
I am running a docker bitcoin-core with the following docker image
`docker run -d -p 18332:18332 ruimarinho/bitcoin-core:0.15-alpine -printtoconsole -server -rpcauth='someusername:somepassword -regtest -wallet=somewallet.dat -rpcallowip=172.17.0.0/16 -txindex
`
Help me to resolve this error
see the comment I closed this issue with for a solution
What I did is
docker run -d -p 18332:18332 ruimarinho/bitcoin-core:0.15-alpine -printtoconsole -server -rpcauth='someusername:somepassword -regtest -wallet=somewallet.dat -rpcallowip=0.0.0.0/0 -txindex
const wallet = new Rpc_client({
network: 'regtest',
username: 'someusername',
wallet: 'somewallet.dat',
host : '1X.1X1.X3X.2X7',
port : '18332',
password: 'somepassword',
}, true);
now successfully able to connect, I know there is some security issue in here but i am checking for testnetwork. Would be great if anyone going for mainnet and give a secure method to connect
@ekkis thanks for your reply but i tried that and found no file also i am new to docker so not able to put that in action. would be a great help if you can tell me for mainnet
I'm using the new Docker-for-Mac to run the daemon like this:
where the IP address I allow is my default:
I then run my app:
and get:
though I seem able to connect to the server:
it doesn't hang up on me with a connection error... what am I missing?