For your mobile phone to access VM-hosts two conditions need to be met:
-
Your VM needs to be accessible from the network your phone’s on (configure a public network).
-
The phone should query Landrush to resolve DNS entries.
Most smartphones allow you to configure a custom DNS server (instructions further below), but unfortunately some don’t allow you to configure a DNS server running on port 10053.
To work around that one can proxy queries to the default port 53 with a system-wide DNS server to Landrush.
The DNS-server bind
can be installed with homebrew on
OS X.
In its configuration file forward all queries to your local Landrush and disable caching:
options { directory "/usr/local/var/named"; forwarders { 127.0.0.1 port 10053; }; max-cache-ttl 0; max-ncache-ttl 0; };
After restarting bind you should be able to resolve your VM’s entries on your local default DNS server (port 53):
$ dig -p 53 @localhost myhost.vagrant.test
Set your bind server’s IP address as the DNS server on your external device.
-
Open Settings > Wi-Fi
-
Tap the i-icon next to your network
-
Tap the DNS-row and edit the value
-
Open Settings > Wi-Fi
-
Tap and hold your network, then chose Modify network
-
Check Show advanced options
-
Under IP Settings tap DHCP / Static and change the value to Static
-
Change the DNS 1 value and tap Save
Or use the Dns Changer application.