On 26/04/2020 09.47, Admin Beckspaced wrote:
Am 25.04.2020 um 14:03 schrieb Anton Aylward:
On 25/04/2020 07:15, Admin Beckspaced wrote:
Hello there ;)
never expected that my question about /etc/hosts would raise such attention and receive multiple feedbacks from the list.
An entry in /etc/hosts
112.202.123.179 somedomain.com
DOES axctually work but it depends how you query the IP address
I did query via 'host' or 'dig' but these tools do a direct query to the nameserver. I don't have bind running on the server but forward to external DNS server
So if I do a 'ping' lookup via /etc/hosts works.
As pointed out by a few people DNSMasq is what I'm looking for.
Er... you have a little confusion here. The tools "host" or "dig" are designed to test the name servers and ignore the "files", ie, what /etc/hosts say. These tools do not replicate what happens with a normal program that asks the system for a name to IP conversion. Instead, you test the toolchain with "ping", and then you see that /etc/hosts works perfectly. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)