blocky

by QuenchWorks

Helm chartv0.0.3App 0.36.0Apache-2.0Verified publisher

Blocky: a DNS proxy and ad blocker with blocklists, conditional forwarding, DoH/DoT upstreams, caching and Prometheus metrics. Hardened by QuenchWorks: built from source, nonroot, CVE-gated, cosign-signed and pinned by digest.

About this chart

Quenchworks Blocky

Hardened Blocky, a DNS proxy and ad blocker for the local network: blocklists per client group, custom and conditional DNS, DNS-over-HTTPS/TLS upstreams, caching and Prometheus metrics. The image is built from source, runs as uid 1001 and is CVE-gated at build, cosign-signed and pinned by digest.

Install

helm install dns oci://ghcr.io/quenchworks/charts/blocky
kubectl run -it --rm q --image=ghcr.io/quenchworks/images/busybox:1.38.0 --restart=Never --command -- nslookup example.com dns-blocky

Configuration

config is Blocky's own config.yml as YAML and goes to Blocky unchanged, except ports (and certFile / keyFile with TLS), which the chart sets. The default forwards to Cloudflare and Quad9 over DNS-over-HTTPS, caches for at least 5 minutes and serves metrics.

config:
  blocking:
    denylists:
      ads: [https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts]
    clientGroupsBlock:
      default: [ads]
  conditional:
    mapping:
      corp.example: 10.0.0.53
KeyDefaultWhat it does
configDoH upstreams, cache, metricsBlocky's config.yml
service.dnsPort53DNS on UDP and TCP (container port 5353)
tls.enabledfalseDNS-over-TLS (853) and DNS-over-HTTPS (443, /dns-query)
service.dotPort, service.dohPort853, 443Service ports for DoT and DoH
extraArgs[]More blocky arguments

Port 4000 serves the API (blocky query, blocking on/off) and /metrics; keep it inside the cluster.

Verify the image

cosign verify ghcr.io/quenchworks/images/blocky \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Deploy blocky with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has blocky on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartblocky is pinned at v0.0.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply