Skip to content

Instantly share code, notes, and snippets.

@SkeLLLa
Last active March 2, 2023 09:43
Show Gist options
  • Save SkeLLLa/8881a3084b0ca8054804b38bb8274a8d to your computer and use it in GitHub Desktop.
Save SkeLLLa/8881a3084b0ca8054804b38bb8274a8d to your computer and use it in GitHub Desktop.
Blocky config to use with home assistant
[Unit]
Description=Blocky service
ConditionPathExists=/home/ubuntu/apps/blocky/blocky
After=network.target
[Service]
Type=simple
User=ubuntu
Group=ubuntu
Restart=on-failure
RestartSec=10
WorkingDirectory=/home/ubuntu/apps/blocky
ExecStart=/home/ubuntu/apps/blocky/blocky --config=/home/ubuntu/apps/blocky/config.yml
SyslogIdentifier=blocky
[Install]
WantedBy=multi-user.target
upstream:
default:
- tcp-tls:dns.google:853
- tcp-tls:1dot1dot1dot1.cloudflare-dns.com:853
- tcp-tls:dns.quad9.net:853
conditional:
fallbackUpstream: false
mapping:
# for reverse DNS lookups of local devices
1.168.192.in-addr.arpa: 192.168.1.1
# resolver for .lan
lan: 192.168.1.1
customDNS:
customTTL: 1h
filterUnmappedTypes: true
rewrite:
home: lan
mapping:
# Extra domains (e.g. router)
edge.lan: 192.168.1.1
clientLookup:
upstream: 192.168.1.1
singleNameOrder:
- 2
- 1
blocking:
blackLists:
ads:
- https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts
- https://adaway.org/hosts.txt
- https://raw.githubusercontent.com/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/master/hosts
malware:
- https://raw.githubusercontent.com/durablenapkin/scamblocklist/master/hosts.txt
- https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
- https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareHosts.txt
- https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-hosts-online.txt
tracking:
- https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
- https://perflyst.github.io/PiHoleBlocklist/SmartTV.txt
- https://perflyst.github.io/PiHoleBlocklist/android-tracking.txt
clientGroupsBlock:
default:
- ads
- malware
- tracking
blockType: nxDomain
caching:
minTime: 10m
prefetching: true
prometheus:
enable: true
path: /metrics
queryLog:
type: none
bootstrapDns: tcp+udp:192.168.1.1
port: 53
httpPort: 4000
logLevel: error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment