raspberry pi version
Linux raspberrypi 4.14.62-v7+ #1134 SMP Tue Aug 14 17:10:10 BST 2018 armv7l GNU/Linux
docker version
Docker version 18.06.1-ce, build e68fc7a
ラズパイに内向けDNSサーバを立てて,アドブロックをします. DNSサーバはコンテナとして稼働させます.
LAN内に静的IPアドレスを割り当てたラズベリーパイをたてて,その中でDNSサーバの入ったコンテナを動かします. dnsmasqが参照するファイルに こちら を加工したものを読み込ませます. これによって,広告のドメインを問い合わせた時に,0.0.0.0というIPアドレスが返ってくるようにします.
このリポジトリにあるdockerfileを自分でビルドして,docker run
するか以下のコマンドを実行する.
Run container
docker container run --cap-add=NET_ADMIN -d -p 53:53/udp -p 53:53/tcp --name adblock_dns rixycf/dnsmasq_adblock_alpine:0.1