OpenWrtシンプルDNS方式

3062 ワード

の準備を

  • 環境
  •     NETGEAR WNDR3700v4
        OpenWrt Chaos Calmer 15.05.1 / LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55)
    
    
  • 準備ソフトウェア
  •  dnscrypt-proxy 
    

    dnscrypt-proxyのインストール

    $ opkg update
    $ opkg install dnscrypt-proxy
    

    簡単じゃない?

    構成/etc/config/dnscrypt-proxy

    config dnscrypt-proxy
        option address '127.0.0.1'
        option port '5553'
        # option resolver 'opendns'
        option resolvers_list '/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv'
    

    起動&起動
    /etc/init.d/dnscrypt-proxy enable
    /etc/init.d/dnscrypt-proxy start
    

    一般的にopenwrtはdnsおよびdhcpサービスとしてdnsmasqを使用するので、ここでもこの編集/etc/config/dhcpが必要です.
    config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        #option resolvfile '/tmp/resolv.conf.auto'  
        option noresolv  1
            list server '127.0.0.1#5553'
            list server '/pool.ntp.org/208.67.222.222'
    
  • option resolvfileこれはISPの解析情報であり、汚染源
  • option noresolvはこの/etc/resolvの使用を禁止する.confファイルのdnsサービスリスト
  • list server上記で定義したndscryptサービス
  • を使用
  • list server/pool.ntp.org/208.67.2222 DNscryptは正確な時間が必要なので、この時間サーバ
  • が必要です.
    構成はほぼ完了しており、再起動はdnsmasqで、クライアントはdhcp情報をリフレッシュする必要があり、知らなければマシンを再起動するのが最も簡単です.

    ログ#ログ#

    $ logread
    
    Mon Oct  3 13:40:16 2016 daemon.notice dnscrypt-proxy[1692]: Proxying from 127.0.0.1:5553 to 222.222.220.220:443
    Mon Oct  3 13:46:40 2016 daemon.info hostapd: wlan0: STA 11:11:11:11:18:60 WPA: group key handshake completed (RSN)
    Mon Oct  3 13:46:40 2016 daemon.info hostapd: wlan0: STA 11:11:11:11:18 WPA: group key handshake completed (RSN)
    Mon Oct  3 13:46:40 2016 daemon.info hostapd: wlan0: STA 11:11:11:11:18 WPA: group key handshake completed (RSN)
    Mon Oct  3 13:46:40 2016 daemon.info hostapd: wlan0: STA 11:11:11:11:18 WPA: group key handshake completed (RSN)
    Mon Oct  3 13:56:40 2016 daemon.info hostapd: wlan0: STA 11:11:11:11:18 WPA: group key handshake completed (RSN)
    Mon Oct  3 13:56:40 2016 daemon.info hostapd: wlan0: STA 11:11:11:11:18 WPA: group key handshake completed (RSN)
    Mon Oct  3 13:56:40 2016 daemon.info hostapd: wlan0: STA 11:11:11:11:18 WPA: group key handshake completed (RSN)
    Mon Oct  3 13:56:40 2016 daemon.info hostapd: wlan0: STA 11:11:11:11:18 WPA: group key handshake completed (RSN)
    
    

    不足や不正確な点があれば指摘してほしい.
    デバイスサポートリストOpenwrtリファレンスOpenwrtリファレンスDNSCrypt