LANRecently, I acquired a Raspberry and configured a small server at home with Ubuntu server. I also purchased a domain name, contracted a fixed IP with my provider, opened a ssh port and started being able to access my home server from anywhere.

But I noticed I was not able to access my server using the domain name when I was connected to my local network. For instance from a tablet, a cell phone or another computer connected through Wifi in my local network. I think this is so because the local network router assigns an IP address to the server which is different from the fixed IP address associated with the domain name.

This could be easily solved by assigning domain names to local IPs in the router configuration, but it turned out that my Internet provider blocks this in the routers they install. The reason is to avoid people changing their DNS (Domain Name Server) and creating issues for them to solve. So I had to think of a way to create an alternative DNS within my local network.

A possible way of doing it is to define the DNS assignment in each device connected to the LAN. This is not practical, and for some type of devices it is not trivial (for instance for Android devices).

Looking at the alternatives, I read that what it has to be done is to have a DHCP server at a  another device different from the router, and do the domain name assignments there. In my case the obvious candidate was the server installed in the Raspberry. I saw there were two packages that provide a DHCP server, isc-dhcp-server and dnsmasq. There is also bind, which is more complete, but it is more complex to configure, so I tried to avoid using it.

Powered by Drupal

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer