title: Accessing Node.js on local VirtualBox from Android Emulator
body: <p>As part of learning Node.js, I decided to use it a s a server side for an Android client.
  I deployed a Ubuntu 11 VirtualBox with Node, NPM, Android SDK and Netbeans 7 - and went to it.</p>
  
  <p>The problem: I cannot access my local host from the emulator.</p>
  
  <p>Here's what I tried:<br>
  1. The Node "hello world" script:</p>
  
  <pre><code>var app = require('express').createServer();
  
  app.get('/', function(req, res){
      res.send('Hello World\r\n');
  });
  
  app.listen(3000);
  </code></pre>
  
  <p>2. Terminal > <code>ifconfig</code> returned 'inet addr:10.0.2.15'<br>
  3. Terminal > <code>curl 10.0.2.15:3000</code> -> "Hello World"<br>
  4. Browser > <a href="http://10.0.2.15:3000" rel="nofollow">http://10.0.2.15:3000</a> -> "Hello World"<br>
  5. Android emulator > app trying to access <a href="http://10.0.2.15:3000" rel="nofollow">http://10.0.2.15:3000</a> -> "Connection to <a href="http://10.0.2.15:3000" rel="nofollow">http://10.0.2.15:3000</a> refused"<br>
  6. Android emulator > Android browser > <a href="http://10.0.2.15:3000" rel="nofollow">http://10.0.2.15:3000</a> > "web page not available"</p>
  
  <p>Just to verify, I did Android emulator > Browser > any other page - works.<br>
  So it looks like the Android Emulator cannot access the local VirtualBox IP.</p>
  
  <p>I have no firewalls running inside the VBox, and I know of no setting inside the emulator I can change. At first I thoyght it was my app (although it's a dummy "get url" small app with <code>android.permission.INTERNET</code> in its manifest), but I can't even reach it from the browser.</p>
  
  <p>Any direction or idea I missed?<br>
  Your time and assistance is appreciated!</p>
  
  <p>Guy</p>