Resolving xip.io DNS with OpenWRT

I use MAMP for local PHP development server and it has a very nice option to automatically set up ServerAlias using xip.io so that the virtual host will become accessible from LAN. This is especially nice to allow communication between tablet and my virtual host.

Screen Shot 2017-07-13 at 11.25.37.png

This worked well in the office, but my home OpenWRT router seemed to block such usage. Turns out that it has a security feature to filter out DNS results that point to private networks, otherwise known as RFC1918 responses.

Allow RFC1918 Private Network DNS responses

To allow OpenWRT to forward such responses, open the web interface, and navigate to DNS settings.

openwrt_dns_settings.png

In the General Settings tab, scroll down to find Rebind Protection and add xip.io as whitelisted exception.openwrt_rfc1918_exception.png

Now try to access your xip.io domain from your LAN and it should work as intended.