Re: network not respecting my hosts file
On 7/3/21, Robbi Nespu <robbinespu@gmail.com> wrote:
> I am using StevenBlack host file
> (https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) to
> block ads / malware / ect via host file.
>
> But somehow the system does't respecting my hosts file anymore.. that weird
>
>> $ sudo cat /etc/hosts | grep wizhumpgyros.com
>> 0.0.0.0 wizhumpgyros.com
>>
>> $ ping wizhumpgyros.com
>> PING wizhumpgyros.com (51.195.115.102) 56(84) bytes of data.
>> 64 bytes from ip102.ip-51-195-115.eu (51.195.115.102): icmp_seq=1 ttl=44
>> time=212 ms
>> ^C
>> --- wizhumpgyros.com ping statistics ---
>> 2 packets transmitted, 1 received, 50% packet loss, time 1001ms
>> rtt min/avg/max/mdev = 211.749/211.749/211.749/0.000 ms
>>
>> $ ls -lrta /etc/ | grep hosts
>> -rw-r--r-- 1 root root 411 Feb 25 18:45 hosts.allow
>> drwxr-xr-x 4 root root 4096 Mar 13 10:19 ghostscript
>> -rw-r--r-- 1 root root 14769 May 10 02:19 hosts.deny
>> -rw------- 1 root root 2480447 Jul 4 11:01 hosts
>
> I expecting pinging wizhumpgyros.com and all others defined blocked
> domain will give me time-out or something but seem it not happen.
>
> I already flush via systemctl restart networking and reboot my computer.
> Still it not working as I expected
Maybe your /etc/nsswitch.conf?
$ grep hosts /etc/nsswitch.conf
# hosts: files mdns4_minimal [NOTFOUND=return] dns
hosts: files dns
Reply to: