The nslookup, dig and ping return different values for me. I want foo.bar.name to always resolve statically to localhost on my machine.
I used the command host <myname.favorite.name> and edited
host foo.bar.name
and edited /etc/hosts to include the line 1.1.1.1 foo.bar.name foo
1.1.1.1 foo.bar.name foo
(where 1.1.1.1 ip address of localhostmy host machine)
So that when I ping foo.bar.name it resolves to 1.1.1.1. LikewiseWhen I run either ping or curl locally to connect to foo.bar.name, it resolves to 1.1.1.1 and connects finebehaves the way I want. But
But when I run dig, andor nslookup for that matter, it connects to what must be some other source of DNS services and resolvesthe foo.bar.name to something else, not localhost. For a test I'd like to run, I need this machine to beaddress resolves completely oblivious to any DNS other than its own which should return localhost for foo.bar.name and no other ipsdifferently. What
Did I miss something?
What configurations do I need to modify to make sure that happen?on that particular host DNS resolution happens the way I've stated.