Re: hosts file modification - dll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Montag 31 August 2020 schrieb William Morder via trinity-users:
> Okay, the hosts after 127.0.0.1 and 0.0.0.0 are (or ought to be)
> identical; I just looked at it, and they don't seem to match,
> although I thought that I had done it already.

In /etc/hosts IP adresses are assigned to domain names. The difference
is if a domain name is being assigned 0.0.0.0 the request will be send
to digital nirvana. If it is assigned 127.0.0.1 it will be served by 
localhost, if you have a web server running so you can see there has
been something blocked/deviated. IIUC.

If you don't have a web server running to respond to these it doesn't 
make sense to use 127.0.0.1 in /etc/hosts to block domains because the 
system first tries to serve these requests before ending with an error… 
well, I don't know the exact mechanism, but you can save these 
computing cycles by using only 0.0.0.0 in /etc/hosts. Again, IIUC.

> So far as "what has been added" by the present author, well, good
> luck there. I mostly recognize where my hand has touched, but others
> may not spot the tell. Mostly you can identify mine by how messy the
> entries are, especially because they tend to repeat elements in the
> address, e.g.:
>
> 0.0.0.0 fao.org
> 0.0.0.0 *.fao.org*
> 0.0.0.0 coml.org
> 0.0.0.0 *.coml.org*
> 0.0.0.0 nco-assets.s3.amazonaws.com
> 0.0.0.0 maxcdn.bootstrapcdn.com
> 0.0.0.0 *maxcdn*
> 0.0.0.0 *bootstrapcdn*
> (etc. ... trying to block unwanted elements on annoying pages).

I don't think you can use wildcards in /etc/hosts. That's why 
hosts-based blocklists are usually very, very big. See man hosts:

DESCRIPTION
This manual page describes the format of the /etc/hosts file.  This
file is a simple text file that associates IP addresses with hostnames,
one line per IP address.  For each host a single line should be present
with the following information:

        IP_address canonical_hostname [aliases...]

Fields of the entry are separated by any number of blanks and/or tab
characters.  Text from a "#" character until the end of the line is a
comment, and is ignored.  Host names may contain only alphanumeric
characters, minus signs ("-"), and periods (".").  They must begin with
an alphabetic character and end with an alphanumeric character.
Optional aliases provide for name changes, alternate spellings, shorter
hostnames, or generic hostnames (for example, localhost).

HTH

Kind regards,
Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: trinity-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: trinity-users-help@xxxxxxxxxxxxxxxxxxxxxxxxxx
Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/
Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting





[Index of Archives]     [Trinity Devel]     [KDE]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]     [Trinity Desktop Environment]

  Powered by Linux