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.

Bash and Networking

Bash is one of these gems in the computer world that do not require reading manual for most of the basic use. But extensive reading can lead to expertise and such people tend to prefer bash for tasks of increasing complexity whereas others would have already turned to higher level programming languages.

One such case is networking. How many people know that you can do basic socket I/O with bash? One of such people is my coworker, who pointed this out for me.

Read More »