Adding hosts entry to iOS in absence of DNS

You can edit the hosts file on the iOS device if the device is jailbroken.

The hosts file can be found in the same place as on OS X: /etc/hosts. It works exactly the same as the hosts file on OS X.

Set the hostname of your OS X machine using:

sudo scutil --set HostName your-hostname