I want to have a DNS redirect for devices on my home network

2

So i have multiple raspberry pi, One as media server, one as a torrent client and one as a webserver.

Everytime i have to access them over browser i usually type say for example: 192.168.1.2:1234 say for torrent client, 192.168.1.3:3456 for say Kodi remote etc. I want rather than typing IP address can i assign human friendly names so its not only easy for me but also easy for non tech family members.

Example: typing RemoteX will redirect to 192.168.1.3:3456 or TorrentX on browser will redirect to 192.168.1.2:1234

Is this achievable? [I don't want to write host entries for sure]

TIA

-- Update-- Adding router info: My router is Asus RT AC87U

KD.

Posted 2016-04-11T13:10:37.623

Reputation: 121

Only internal addresses? Did you read the documentation on your router? – Raystafarian – 2016-04-11T13:16:39.990

I looked into the DNS screen and dont see any option to add any such entry. What should i be looking for? My router is Asus RT AC87U – KD. – 2016-04-11T13:18:31.867

You say "access over the web" but then your ip examples are all local addresses that could only be accessed locally and not from "over the web". Are you trying to set things up for local or remote access? – Tyson – 2016-04-11T15:23:23.407

@Tyson sorry for the confusion. I mean access using browser. All the ip are local – KD. – 2016-04-11T15:33:29.243

Answers

3

I would set up a local DNS server, to do internal resolving, if I were you. Try dnsmasq on a linux (raspberry pi) box. Set up the ip-to-hosts resolving in /etc/hosts on the linux box that will run dnsmasq. Then fire up dnsmasq on that linux box, and by default, it will read /etc/hosts. Then make sure that the client PCs that need to do the resolving are using that box as their DNS server. This is easy to do if you are running your own DHCP server. I would personally have the same linux box act as my DHCP server, to make this a one-stop shop for ip stuff. Note that the dnsmasq service will redirect all other non-internal requests to its own default dns server (the one in /etc/resolv.conf) just fine.

Another way to the resolving w/o using dnsmasq is to just hard-code those ip address locally in a hosts file. i.e., on Windows, put it here:

%WINDIR%\System32\drivers\etc\hosts

Note that you might need to append a "." to the hostname, though, e.g.:

ping mediapc.

or

wget http://mediapc.:1234

atreyu

Posted 2016-04-11T13:10:37.623

Reputation: 302

EDIT: did not notice you didn't want to write to local hosts file, so ignore my "Another way". – atreyu – 2016-04-11T13:44:30.873