2

I'm running my android emulator on Ubuntu 13.04. I've developed an App which needs to access a http service on another machine on the same network as my own workstation.

I know that emulator runs a virtual router/firewall for itself with 10.0.2/24 network address space. Also, I know that the 10.0.2.2 is an special alias to my host loopback interface (127.0.0.1).

Whenever I set a destination address other than my own (but on the same network), my App fails to establish a connection. The service on my own machine is only accessible by using 10.0.2.2.

In other words, how can I make the emulator access the network available on my workstation? For example, my IP is 192.168.1.2 and I want to access a service on 192.168.1.3.

By the way, I have no firewall installed.

Vahid
  • 1,625
  • 1
  • 18
  • 33
  • possible duplicate of [How to setup Android emulator proxy settings?](http://stackoverflow.com/questions/1570627/how-to-setup-android-emulator-proxy-settings) – Chintan Rathod Aug 12 '13 at 13:01
  • I know that I can set a proxy. But in this case we tried the exact process on a windows machine WITHOUT specifying any proxies and the android App was able to access the other workstation. Somehow on the Windows workstation the emulator knows how to communicate with the network on that machine. This is not happening on the Ubuntu workstation. – Vahid Aug 12 '13 at 14:41
  • Can you use other application to set proxy in your emulator which help emulator to set proxy and port? – Chintan Rathod Aug 12 '13 at 14:45
  • I'm not following your question. Would you please be more specific? – Vahid Aug 12 '13 at 14:59
  • I mean, there is Proxy Setting application available in market. You can use for temporary solution. – Chintan Rathod Aug 12 '13 at 17:55
  • Thank you. But I want to understand the reason behind this problem. – Vahid Aug 13 '13 at 04:02

1 Answers1

1

On my machine I have CNTLM in order to authenticate with the Microsoft proxy server. In the /etc/cntlm.conf, in the section "No proxy" I had not entered the machine addresses to which I wanted to have communication. As a result, all the requests were going through the CNTLM to the proxy server and because of some misconfigurations on the network DNS and proxy server the addresses could not be resolved. As soon as I put the addresses of all the machines to which I wanted to have communication (in the "no proxy" section of the cntlm.conf) emulator could directly connect to the remote machines on my network.

Vahid
  • 1,625
  • 1
  • 18
  • 33