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

4
  • Only internal addresses? Did you read the documentation on your router? Commented Apr 11, 2016 at 13:16
  • 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.
    Commented Apr 11, 2016 at 13:18
  • 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
    Commented Apr 11, 2016 at 15:23
  • @Tyson sorry for the confusion. I mean access using browser. All the ip are local
    – KD.
    Commented Apr 11, 2016 at 15:33

1 Answer 1

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
1
  • EDIT: did not notice you didn't want to write to local hosts file, so ignore my "Another way".
    – atreyu
    Commented Apr 11, 2016 at 13:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .