On 03/04/2011 03:28 AM, erikmccaskey64 wrote:
https://pastebin.com/raw.php?i=n2660q6u <https://pastebin.com/raw.php?i=n2660q6u > Why does "ping" sees "audit.median.hu" as 127.0.0.0, and why does "host -t a audit.median.hu" sees it as "193.68.35.149"?
I just have a caching nameserver on my Fedora PC: yum -y install caching-nameserver service named restart chkconfig named on
I configured my DNS server addresses in the Network-Manager Applet: 127.0.0.1, 8.8.8.8
"audit.median.hu" is just an example site [hosts ads, etc.]
Even with wireshark: i can see the: 195.70.37.149 DNS Standard query A audit.median.hu
So the big question: WHY doesnt the host command, or my webbrowser recognizes, that i've modified the "audit.median.hu"'s IP address?? WHY?
Thank you for any help..
Check /etc/nsswitch.conf. I'm willing to bet you have an entry:
hosts: files dns
If so, and you have an /etc/hosts entry that says
127.0.0.1 audit.media.hu
then that's what will get pinged, since the resolver library for ping will use the /etc/hosts entry (because the "files:" bit of nsswitch.conf tells it to). In fact, any command that uses the resolver libraries will exhibit the same behavior.
The host command is intended to test the DNS system so it sends out DNS queries directly (and ignores nsswitch.conf). nslookup in its day did the same thing. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, C2 Hosting ricks@nerd.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - Blech! ACKth! Ooop! -- Bill the Cat (Outland) - ----------------------------------------------------------------------