Sample Header Ad - 728x90

How to block hostnames with wildcards or Regex?

3 votes
2 answers
5858 views
Currently I uses a big /etc/hosts to block unwanted hostnames. But the file is getting bigger and bigger closing in on 700000 entries. The are many similar entries so I would like to use wildcards like *.co.kr because I don't speak any Korean. Also hostnames that start with a digit or are longer than 64 characters are likely candiates I want to block. AFAIK /etc/hosts does not provide that functionality. I think some kind of DNS deamon is required. Any ideas? Edit: I chose the Korean tld just as a example. My /etc/hosts is getting bigger and bigger and harder to maintain. Most of the hostnames in there could be reduced to a small set of rules instead.
Asked by aggsol (95 rep)
Aug 8, 2017, 06:56 AM
Last activity: Aug 9, 2017, 09:50 PM