LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-28-2019, 11:07 PM   #1
FOSSilized_Daemon
Member
 
Registered: Mar 2019
Posts: 188

Rep: Reputation: 13
/etc/hosts block lists


I am working on a set of scripts to help me keep my system secure and clean, one of these scripts gets a list of known ad-trackers and malicious sites and blocks them using /etc/hosts. The issue here is that, I only want a list of ad-trackers and mal-sites; but every list I have come across includes sites that may not be age propriate for everyone (I assume this is to cater to maybe families install for the family computer?). The current list (and only one I really know) of is here: https://raw.githubusercontent.com/Lu...etc/master/ips. I understand one could say "well just remove the ones you want", but here is the issue. This is done at A) every install and B) I am using a cron-job to update /etc/hosts once a week. Does anyone know of one of these that solely blocks only trackers and such? I don't use things like Instagram or Facebook or whatever the new social media thing is so I don't mind those being lumped in, but I want to keep it solely to trackers and such.

Last edited by FOSSilized_Daemon; 06-28-2019 at 11:29 PM.
 
Old 06-28-2019, 11:48 PM   #2
elcore
Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 605

Rep: Reputation: Disabled
hpHosts now shares separate lists (they used to share a single huge list before).
IMO it's a bit more work to merge, but less room for error. It's better than it used to be.
 
Old 06-29-2019, 02:27 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 12,490
Blog Entries: 9

Rep: Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380
Here's a huge list of hosts files provided around the internet. Well commented. Take your pick.
You might also want to take a closer look at the repo this was taken from; it implements merging lists and whitelisting and blacklisting.
Warning: don't use the install.sh! It's crap.
 
Old 06-29-2019, 07:33 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,435
Blog Entries: 25

Rep: Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439
I've been using this for my hosts file for years: http://winhelp2002.mvps.org/hosts.htm

It's updated regularly.
 
1 members found this post helpful.
Old 06-29-2019, 07:56 PM   #5
FOSSilized_Daemon
Member
 
Registered: Mar 2019
Posts: 188

Original Poster
Rep: Reputation: 13
Thank you all so much for the lists! Now to write a script to grab them all, merge them and move them to /etc/hosts!
 
Old 06-30-2019, 02:48 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 12,490
Blog Entries: 9

Rep: Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380Reputation: 3380
Quote:
Originally Posted by FOSSilized_Daemon View Post
Now to write a script to grab them all, merge them and move them to /etc/hosts!
Quote:
Originally Posted by ondoho View Post
You might also want to take a closer look at the repo this was taken from; it implements merging lists and whitelisting and blacklisting.
-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Python - Sorting Lists inside of Lists LXer Syndicated Linux News 0 06-06-2013 01:00 PM
How are opt-in e-mail lists distinguished from spam lists? Travis86 Programming 2 01-29-2012 08:55 PM
LXer: Unique Sorting Of Lists And Lists Of Lists With Perl For Linux Or Unix LXer Syndicated Linux News 0 09-05-2008 01:50 PM
Verify /etc/hosts usage and round robin in /etc/hosts MikeyCarter Linux - Software 1 06-24-2008 12:20 PM
/etc/hosts, /etc/resolve.conf and /etc/host.conf config probs below_average Linux - Networking 1 12-08-2004 10:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration