Expose “easy” URL’s for machines on a home network. Is custom DNS/BIND the answer

binddnsnetworking

I recently convinced my room mates to cut the cord and go cable free, and they've found it pretty great so far. I'm in the process of setting up a pretty sweet, mostly automated home theater setup that revolves around an Apple TV, and part of this automation uses stuff like Sick Beard, Couch Potato, and the Transmission daemon.

I've got everything mostly working, including the web interfaces for all of the above services, but I'd like to make the URL's more friendly than <ip address>:<port number> so that my room mates, who are not technical in the slightest, can access these services (especially Couch Potato and Sick Beard). I'd like for them to be able to go to a url like movies.home or tv.home (I know that collides with a proposed TLD, if you have suggestions on this front as well I'm open) and be able to add shows to Sick Beard or put a movie on Couch Potato's watch list since those UI's are fairly straight forward to use.

I'd like for this name resolution to be done at a network wide level, so that all of our phones and laptops and whatnot can get to the web interfaces without much work or me having to go around and editing everybody's hosts file. I don't care about accessing the stuff from outside of the home network, I only want it usable from our internal network.

I'm not completely sure where to start, and I wanted to make sure I wasn't missing a simpler solution before pursuing a custom DNS server with BIND since I've never used it before and I wasn't sure if it would do what I want it to do; I was thinking that I'd set up BIND on a box somewhere in the house and then have my wireless router point to that local box as its DNS server then figure out some way to have the BIND box forward all non-home-media related requests to OpenDNS or something. Can BIND even do resolution based on different ports instead of different logical addresses? Anyway. Help is greatly appreciated.

Best Answer

First, yes, you need your own nameserver for that and bind is as good as any. Maybe a little harder to get into at first, but there are enough examples and tutorials on the internet. The advantage with bind is, that you probably won't ever miss a feature.

I suppose you are using DHCP to provide all your clients with IP Adresses and such. One of the options you can provide via DHCP is the search domain (not sure on the precise naming). Computers store this information and whenever a computer cannot resolve a name for instance movies it appends the search domain, for example home.sweet.home.org and tries again with the full name movies.home.sweet.home.org. Using your own nameserver and DHCP allows you to use short names, if that's what you're looking for.

However, you may run into problems as bind will not resolve names to a combination of ip and port. If you can't separate your web interfaces via virtual hosts (if you're using apache) you may need to give your media server multiple IPs and have those services listen on different IPs.

Related Question