I'm trying to Configure and Connect to VPN in Genymotion Virutal Device, I can configure VPN connection in the Virtual Device but unable to Connect, No error showing.
I used same settings in my PC and Real Android Devices, Its working fine in the device and PC.
I think Its problem with VirtualBox, But I don't know how to resolve it
System Details:
- OS: Linux Mint 32Bit
- Genymotion Version : 2.1.1
- Virtual Device: Galaxy S4 - 4.3 - API18 - 1080x1920
Genymotion use Virtual Box, you need open this and set the connection Bridged instead NAT, power on the Android Genymotion VM in Genymotion APP and set VPN.
Solution 1 :
Install a VPN application on the virtual device like VPNSecure or SecureVPN or the one from your provider, otherwise you could use OpenVPN application
Solution 2 :
Connect to your VPN in you host machine (you can disable binding your vpn connection to avoid passing through all the application)
Then you can force player.exe and genymotion.exe to use a specific network card (your vpn virtual network card/ip) a solution could be forcebindip
http://old.r1ch.net/stuff/forcebindip/
ForceBindIP.exe -i 192.168.1.25 "C:\Program Files\Genymobile\Genymotion\genymotion.exe"
where 192.168.1.25 is the ip of the interface you want to use
This application redirect any connection to a specific interface and keep it there.
Note : As this program is source closed you could be skeptical in a perspective of using it all the time, i personally disassembled it and checked every action and it seem that it's a clean application.
Solution 3 (Best):
On top of genymotion, install virtual box (i think you need to have virtual box before using genymotion) then when you run virtualbox application it will display your virtual android device, you can then set the different advanced setting directly on virtualbox application like so :
This worked for me:
Open virtual box, find the Genymotion device -> settings -> network.
I had two adapters set much like in initika's answer (3rd option screenshots). What I did was close the device, then disable the first adapter (host only) and leave the second adapter set to NAT. Then I restarted the device. and saw that it could now access the private network.
I had a similar issue and what I did to solve it was:
Open virtual box, find the Genymotion device -> settings -> network.
Choose the "Adapter 2".
Change the Attached to option to "Bridge Adapter".
Select the network card from your PC.