Giter VIP home page Giter VIP logo

unbound-block-hosts's Introduction

NAME

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

SYNOPSIS

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.

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.

  • --url=URL

    The URL to retrieve. This is http://someonewhocares.org/hosts/hosts by default.

  • --file=FILE

    The file to write. This is /var/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: /var/unbound/local-blocking-data.conf

COPYRIGHT

Copyright 2015 Gavin Brown <[email protected]>

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

SEE ALSO

unbound-block-hosts's People

Contributors

gbxyz avatar m4teh avatar mplx avatar watfordjc avatar xmj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unbound-block-hosts's Issues

Use always_nxdomain

Hey jodrell,

I wanted to use always_nxdomain, so you don't need double entries for A and AAAA and no replies from the localhost (which is my nginx).

I don't speak perl so I made something in python which uses
local-zone: always_nxdomain

Seems to work fine, maybe an idea for your script.

dnsblock.py
block.conf (output)

Add ipv6 support

It would be cool, if the script generates AAAA records too (maybe optional).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.