# This is an example unbound-adblock configuration file. # It is strongly recommended to configure unbound-adblock from the commandline rather than from a config file \ # as a config file essentially amounts to arbitrary code injection into the pf-badhost process. # # If you know what you're doing, the possibilities here are endless. # # USE WITH CARE! # ------------------------------------------------------------------------------ # User Configuration Area -- BEGIN # ------------------------------------------------------------------------------ # ########################################################################### # To override a default value, uncomment the value and: # Set to '1' to enable # Set to '0' to disable # Rememeber, this config file essentially executes arbitrary code -- use with care! # HTTP user agent override (Pretend to be Firefox on Win10 by default) #_AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0' # Enable Logging to /var/log/unbound-adblock/ #_LOG=1 # Enable Strict Mode # (This option will cause unbound-adblock to abort if it exceeds maximum specified retrys) #_STRICT=1 # Max Retry Count (How many times we'll attempt to download a file before giving up) #_RETRY=3 # NOTE: DO NOT put quotes in here, as there is a bug in most shells # (including bash and the default shells of NetBSD and OpenBSD) that makes # the shell puke when quotes are used within a HEREDOC statement such as below # See: https://marc.info/?l=openbsd-misc&m=160560808529209&w=2 ################################################################### # Hosts File Blacklist # Add blocklists below, one URL per line # Blocklists may be a combination of /etc/hosts and/or domain-only format # Lines below starting with '#' or ';' will be ignored _BLOCKLISTS=$(cat <<'__EOT' ### Steven Black Hosts List # https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts ### StopForumSpam.com Toxic Domains List # https://www.stopforumspam.com/downloads/toxic_domains_whole.txt __EOT ) ################################################################### ################################################################### # Custom Lists # # Add any lists here that require pre-formatting or special treatment # CUSTOM_LISTS() { : # Examples: # Fabrice Prigent's Blocklists [tar.gz]: # URL_FETCH_STDOUT 'https://dsi.ut-capitole.fr/blacklists/download/malware.tar.gz' | tar -xzf - -C "$tmpdir_fetch" # URL_FETCH_STDOUT 'https://dsi.ut-capitole.fr/blacklists/download/ads.tar.gz' | tar -xzf - -C "$tmpdir_fetch" } ################################################################### ################################################################### # Preprocessor Functions # Add any list formating/preprocessing logic you like here # EXAMPLE_PROC() { awk '{print $1}' } ################################################################### ################################################################### # Custom Filtering # # NOTE: Use of '-r' or '-w' to whitelist URLs is prefered. # # This function can be used to perform arbitrary blocklist filtering. # Use at your own risk. # # Blocklist data will be received by the function on stdin. # Data processed within the function must be exported to stdout. # #_CUSTOM_FILTER=0 # Set to '1' to enable CUSTOM_FILTER() { mygrep -v -e 'example\.com' -e 'example\.org' } # ########################################################################### # ------------------------------------------------------------------------------ # User Configuration Area -- END # ------------------------------------------------------------------------------