On 2017-08-24 00:00, James Knott wrote:
On 08/23/2017 05:37 PM, Carlos E. R. wrote:
The router only have a cache DNS that solves internet addresses. There is no connection between the router DHCP and the router DNS, so that it is impossible to ask it for the IP of a local machine.
Can you not configure the DHCP server to point to your own DNS?
Sure, but two caveats: It has to be running full time It doesn't know about the DHCP assignments. And, when I connect via phone tethering there is no router.
Maybe such a router that hosts a *proper* DNS and DHCP server exists, but none of mine have it.
Furthermore, postfix has been told what is the name of the machine it runs in, and it has to be able to learn the IP of that name (local network) - and this doesn't happen from the router DNS server. It has to be handled, somehow, in the machine that it is running in, a laptop, on a different home network than on initial config.
Think about that ;-)
The only manner I know is writing the name and address line in /etc/hosts.
It's been years since I've worried about that.
Lucky you.
The machine also runs dnsmasq, but the IP/names pairs are configured mainly in the /etc/hosts file as well. So that file has to be edited correctly.
I used to run dnsmasq and put the host names in it's hosts file, but not on the other computers. As I mentioned earlier, I'm currently running pfSense for my firewall/router and it has a choice of DNS forwarder, DNS resolver or pointing to another DNS server. So, any device connecting to my network using DHCP is told to use my firewall for DNS via it's IPv4 address. My main desktop is configured to use the firewall's IPv6 address, along with a couple of external DNS servers, just in case.
But again, my network DHCP is not fully mine. It doesn't talk with the DNS. There is no way that the laptop can get the name-IP assignment unless I edit either the bind file or the hosts file (dnsmasq). Well, I don't edit the file, an automatic script does it. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)