title: 403 Forbidden from bitcoind -server run on docker
body: <p>I'm using the new Docker-for-Mac to run the daemon like this:</p>
  
  <pre><code>$docker run -d --name bitcoind -e BITCOIN_DATA=/data \
      -v ${PWD}/bitcoind:/data -p 8332:8332 seegno/bitcoind:latest \
      -server -rpcuser=test -rpcpassword=nopass -rpcallowip=192.168.1.67 \
      -printtoconsole -debug=rpc
  </code></pre>
  
  <p>where the IP address I allow is my default:</p>
  
  <pre><code>$ ifconfig |grep inet |grep -v inet6
      inet 127.0.0.1 nitmask 0xff000000 
      inet 192.168.1.67 netmask 0xffffff00 broadcast 192.168.1.255
  </code></pre>
  
  <p>I then run my app:</p>
  
  <pre><code>var BTC = require('bitcoin-core');
  var opts = { 
      host: 'localhost',
      port: 8332,
      username: 'test',
      password: 'nopass'
  };
  btc = new BTC(opts);
  btc.getNewAddress().then(function(s) {
      console.log(s);
  });
  </code></pre>
  
  <p>and get:</p>
  
  <blockquote>
    <p>Unhandled rejection RpcError: 403 Forbidden
        at get (/Users/ekkis/Development/Test/www/node_modules/bitcoin-core/dist/src/parser.js:34:11)
        at Client.rpc (/Users/ekkis/Development/Test/www/node_modules/bitcoin-core/dist/src/parser.js:81:14)
        at Request.self.callback (/Users/ekkis/Development/Test/www/node_modules/request/request.js:200:22)
        at emitTwo (events.js:87:13)
        at Request.emit (events.js:172:7)
        at Request. (/Users/ekkis/Development/Test/www/node_modules/request/request.js:1067:10)
        at emitOne (events.js:82:20)
        at Request.emit (events.js:169:7)
        at IncomingMessage. (/Users/ekkis/Development/Test/www/node_modules/request/request.js:988:12)
    From previous event:
        at /Users/ekkis/Development/Test/www/node_modules/bitcoin-core/dist/src/index.js:163:21
    From previous event:
        at Client.command (/Users/ekkis/Development/Test/www/node_modules/bitcoin-core/dist/src/index.js:152:34)
        at apply (/Users/ekkis/Development/Test/www/node_modules/lodash/lodash.js:409:27)
        at Client.wrapper [as getNewAddress] (/Users/ekkis/Development/Test/www/node_modules/lodash/lodash.js:4837:16)
        at Object. (/Users/ekkis/Development/Test/www/t:12:5)
        at Module._compile (module.js:425:26)
        at Object.Module._extensions..js (module.js:432:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:311:12)
        at Function.Module.runMain (module.js:457:10)
        at startup (node.js:136:18)
        at node.js:972:3</p>
  </blockquote>
  
  <p>though I seem able to connect to the server:</p>
  
  <pre><code>$ telnet localhost 8332
  Trying ::1...
  Connected to localhost.
  Escape character is '^]'.
  </code></pre>
  
  <p>it doesn't hang up on me with a connection error... what am I missing?</p>
  
  <p><strong>* edit I *</strong></p>
  
  <p>well... if I run the daemon with <code>-logips</code> and make my attempt I see:</p>
  
  <blockquote>
    <p>2016-07-09 18:32:26 Received a POST request for / from 172.17.0.1:50262</p>
  </blockquote>
  
  <p>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?</p>