I am looking to find out how I could go about forwarding an Android emulator port from the emulator to a publicly accessible port. I have done port forwarding to a port on the host machine’s local loopback interface but I want the port to be accessible across the network. This is part of trying to run some automated testing in the emulator from a remote build server. I cannot access the port from another machine presently and can only connect from the localhost interface. Even trying to connect on the machine itself, if the machines public name is used, the port is not accesible.
It might be that the emulator is just not designed to expose ports on a public interface. In that case I might see if I can get around the problem using some kind of O/S level port forwarding from the public interface to the loop back interface if this ends up being the only way to do it.
I’ve successfully used
stcppipeto achive that. It just forward TCP connections to any of local machine interfaces to a specific IP address (in your case it will belocalhost).It can be download from Luigi Auriemma
Run it with:
Regards.