Accessing a Virtual Device from an Enterprise Network

Foreword

Your local network has tight security

dig turn-paas.genymotion.com +short

The Genymotion instance has no public IP

Use your own TURN server

Installing a TURN server on Linux

sudo apt-add-repository universe

sudo apt update && sudo apt upgrade

sudo reboot

sudo apt-get install coturn

listening-port=443

listening-ip = xxx.xxx.xxx.xxx

# 'Static' user accounts for long term credentials mechanism, only.
# This option cannot be used with TURN REST API.
# 'Static' user accounts are NOT dynamically checked by the turnserver process,
# so that they can NOT be changed while the turnserver is running.
#
#user=username1:key1
#user=username2:key2
# OR:
user = genymotion:123456

sudo systemctl status coturn

Configuring the instance to use your TURN server

adb shell "setprop persist.webrtcd.turn-uri turn:TURNServerIP:443;\
setprop persist.webrtcd.stun-uri stun:STUN_IP:443;\
setprop persist.webrtcd.turn-username username1;\
setprop persist.webrtcd.turn-password password1"

adb shell \
"setprop persist.webrtcd.turn-uri turn:TURNServerIP:443;\
setprop persist.webrtcd.stun-uri stun:STUN_IP:443;\
setprop persist.webrtcd.turn-username username1;\
setprop persist.webrtcd.turn-password password1"

Setup SSH

ssh -i key.pem shell@geny_instance_IP

setprop persist.webrtcd.turn-uri turn:TURNServerIP:443

setprop persist.webrtcd.stun-uri stun:STUN_IP:443

setprop persist.webrtcd.turn-username username1
setprop persist.webrtcd.turn-password password1

ssh -i key.pem shell@geny_instance_IP \
"setprop persist.webrtcd.turn-uri turn:TURNServerIP:443;\
setprop persist.webrtcd.stun-uri stun:STUN_IP:443;\
setprop persist.webrtcd.turn-username username1;\
setprop persist.webrtcd.turn-password password1"

Configuring the instance to use your TURN server (Web UI walkthrough)

Use your own TURN server within the virtual network

Additional notes for Linux setup

sudo apt-add-repository universe

sudo apt update && sudo apt upgrade

sudo reboot

sudo apt-get install coturn

listening-port=443

listening-ip = xxx.xxx.xxx.xxx

# 'Static' user accounts for long term credentials mechanism, only.
# user=username1:password1
# user=username2:password2
# OR:
user=genymotion:123456

sudo systemctl status coturn

Configuring the instance to use your TURN server (Web UI) — continued

Final notes