Skip to content

m4teh/unbound-block-hosts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

NAME

unbound-block-hosts - a script to convert Dan Pollock's ad blocking hosts file into Unbound local-data

SYNOPSIS

perl unbound-block-hosts [OPTIONS]

INTRODUCTION

Dan Pollock (http://someonewhocares.org/) maintains a hosts file that can be used by individual users to block hosts that contain advertisements, spyware, web trackers and other unpleasant, annoying or malicious content.

This script converts this file into a format that can be loaded into the Unbound DNS server, allowing this list to be consumed by an entire network, or by devices (such as smart phones and tablets) which don't support a local hosts file.

REQUIREMENTS

On FreeBSD, you will need www/p5-libwww.

USAGE

unbound-block-hosts supports the following arguments:

  • --address=ADDRESS

    The IP address to resolve to. This is 127.0.0.1 by default.

  • --v6address=ADDRESS

    The IPv6 address to resolve to. This is ::1 by default.

  • --file=FILE

    The file to write. This is /etc/unbound/local-blocking-data.conf by default.

  • --SECTION

    The source file contains a number of sections, which can be enabled or disabled as required. By default, all sections are enabled except for 'shock-sites' and 'maybe-spy'.

This script will compare the modification time of the local file to that on the remote server, and won't request the file if it hasn't been updated.

INTEGRATING INTO UNBOUND

To use the output of this file with Unbound, use the "include:" directive within the "server:" block, like so:

server:
	access-control: 0.0.0.0/8 allow
	include: /etc/unbound/local-blocking-data.conf

COPYRIGHT

Copyright 2013 Gavin Brown gavin.brown@uk.com

This program is Free Software, you can use it and/or modify it under the same terms as Perl itself.

SEE ALSO

About

a script to convert Dan Pollock's ad blocking hosts file into Unbound local-data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Perl 100.0%