Hi, I'm trying to use a TL-MR3020 with LEDE 17.01.5 only as a DNS server in my LAN, the purpose is to resolve local hostnames such as "service1.raspberrypi", "service2.raspberrypi", etc. (or meybe service1.lan, service2.lan? Is it possible?) corrisponding to services hosted on a raspberry pi each one binded on a port of it.
So, I set my router to look for primary DNS server to the local IP of the MR3020 and the secondary one to 184.108.40.206. On LEDE i set DHCP client on LAN interface (I disabled onboard wifi and removed the interface, i don't need it), uncheked Use "DNS servers advertised by peer" and added manually 220.127.116.11 and 18.104.22.168.
Thank you for answering, I thought the second DNS intervenes in the case did not answer the first, for a redundancy purpose. However I've removed second DNS in my router but the problem persists. Using nslookup command I can see that the DNS responding server is the MR3020 local IP (not 22.214.171.124 or others), and I think that the problem is the SRV record that doesn't work, because using nslookup I can retrieve IP of my raspberry pi but searching for the srv type it doesn't find it. Probably it's wrong how i wrote the SRV record or it isn't usefull for my purpose.
Yes, i cleared cache. I've defined an SRV record because reading the page that i linked before it seemed to me that defining an SRV record was right for defining a subdomain (e.g. "plex.") of "raspberrypi" corrisponding to a service on the raspberry pi on a defined port (32400 in plex case). I've already defined an A record for the raspberry pi IP, but it alone can't bind a service or another hosted on the raspberry, the IP address is the same for all of them. So i tried to define that SRV record, but evidently it isn't right. I want associate the various services of the raspberry pi to corrispective subdomain of "raspberrypi", each subdomain.hostname is basically binded to a ip:port. How can i do that?
I'm sorry, I try to explain me better. Services involved are a Plex server (multimedia streaming), a client torrent (transmission) and others. Each of those is a service onto the raspberry pi, accessible via their own web page typing "ip address of raspberry":port. For instance: 192.168.1.100:32400 is for Plex, 192.168.1.100:9091 for Transmission client torrent, and so on.
My purpose is to basically write into the browser "plex.raspberrypi", "transmission.raspberrypi" for rispectively plex and transmission instead for host:ip.
I've altready define an A record for binding the ip address 192.168.1.100 to hostname "raspberrypi" (obviously IP address is static). How to define those subdomains?
Are you trying to delegate a zone (requires another DNS server), or simply make another A Record for a third-level domain?
If you are simply making an A Record for a third-level domain:
option name 'host1.example.foo'
option ip '192.168.1.100'
option name 'host2.example.foo'
option ip '192.168.1.101'
option name 'host3.example.foo'
option ip '192.168.1.102'
Also, Dnsmasq entries must be FQDNs. You cannot have a hostname without a domain after the empty period (i.e. your raspberrypi DNS entry is invalid on OpenWrt).
Sorry for hijacking this thread.I understand what OP tries to accomplish and actually I have the same problem.
I want to type a specified hostname instead of a local ip in my local network and get 'redirected' to the webinterface for ie. of my Synology NAS or maybe to my plex running on the same NAS different port.
I read Documentation DNS, but it is only useful for people who already know what they are doing.
I am trying to keep it simple:
my domainname is: lan
my hostname is: chef
my IP is: 192.168.1.168
What I love to accomplish is: I open my browser type chef and get redirected to 192.168.1.168.
I did. But I always get mixed results. I used luci to set hostnames and static leases.
i.e. chef.lan is resolving.
i.e. grub.lan is not resolving. /etc/config/dhcp has all the necessary information. I read nowadays everything is written/configured in this file. I am not sure what else could be wrong in my set-up. (I cleared browser caches, tried it from different machines).