Skip to content

Instantly share code, notes, and snippets.

@rmoriz
Last active November 23, 2018 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmoriz/9747f423fce6f222cf8c5e5801aab080 to your computer and use it in GitHub Desktop.
Save rmoriz/9747f423fce6f222cf8c5e5801aab080 to your computer and use it in GitHub Desktop.
customize https://github.com/britannic/blacklist on a UBNT router
#!/bin/sh
set -o errexit
(apt-key finger | grep "5273D52") || curl -L https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public.key | sudo apt-key add -
configure
(show system package repository | grep blacklist) || \
set system package repository blacklist components main \
&& set system package repository blacklist description 'Britannic blacklist debian wheezy repository' \
&& set system package repository blacklist distribution wheezy \
&& set system package repository blacklist url 'https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/'
commit; save; exit
apt-get update && apt-get install edgeos-dnsmasq-blacklist
configure
# remove false positive list
delete service dns forwarding blacklist hosts source hostsfile.org
# add some useful lists, see https://firebog.net/ for various lists of various quality
set service dns forwarding blacklist hosts source lists_disconnect_me_simple_ad url 'https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt'
set service dns forwarding blacklist hosts source adguard_dns url 'https://v.firebog.net/hosts/AdguardDNS.txt'
set service dns forwarding blacklist hosts source easyprivacy url 'https://v.firebog.net/hosts/Easyprivacy.txt'
set service dns forwarding blacklist hosts source chef-koch-webrtc url 'https://raw.githubusercontent.com/CHEF-KOCH/WebRTC-tracking/master/WebRTC.txt'
set service dns forwarding blacklist hosts source chef-koch-webrtc prefix '0.0.0.0'
# custom shitlist
set service dns forwarding blacklist hosts include gutscheine.spiegel.de
set service dns forwarding blacklist hosts include l9bjkkhaycw6f8f4.soundcloud.com
set service dns forwarding blacklist domains include emsservice.de
set service dns forwarding blacklist domains include www.googletagmanager.com
set service dns forwarding blacklist hosts include wt.vhb.de
set service dns forwarding blacklist domains include flashtalking.com
set service dns forwarding blacklist domains include mpnrs.com
# custom shit whitelist
# investopedia: accused of webrtc tracking, however I need access.
set service dns forwarding blacklist domains exclude investopedia.com
set service dns forwarding blacklist domains exclude cdn.turner.com
set service dns forwarding blacklist domains exclude maps.api.here.com
set service dns forwarding blacklist domains exclude lynxbroker.de
set service dns forwarding blacklist domains exclude downloads.intercomcdn.com
set service dns forwarding blacklist domains exclude track.webgains.com
set service dns forwarding blacklist domains exclude 7eer.net
commit
save
exit
# see also:
# https://github.com/britannic/blacklist#how-do-i-disableenable-dnsmasq-blacklisting
#
# set service dns forwarding blacklist disabled false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment