User Tools

Site Tools


inbox:dnscrypt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
inbox:dnscrypt [2016/11/02 08:39]
dartraiden [Server configuration]
inbox:dnscrypt [2017/07/08 21:43] (current)
dartraiden [dnscrypt-proxy]
Line 27: Line 27:
  
 ^ Package ^ Difference ^ ^ Package ^ Difference ^
-| ''​dnscrypt-proxy''​ | Newest version for Chaos Calmer (with ephemeral keys support). Barrier Breaker support. Procd support and [[http://​wuffleton.com/​hacks/​dnscrypt-openwrt/​|possibility of launching multiple instances]]. |+| ''​dnscrypt-proxy''​ | Newest version for Chaos Calmer (with ephemeral keys support). Barrier Breaker support. Procd support and possibility of launching multiple instances. |
 | ''​libsodium''​ | Newest version for Chaos Calmer. Barrier Breaker support. | | ''​libsodium''​ | Newest version for Chaos Calmer. Barrier Breaker support. |
  
Line 34: Line 34:
 Add third-party source to your opkg configuration file ''/​etc/​opkg.conf''​ according to your OpenWrt version. Add third-party source to your opkg configuration file ''/​etc/​opkg.conf''​ according to your OpenWrt version.
  
-Trunk:+**Trunk:**
  
-  cd /tmp +Already have newest dnscrypt-proxy version with possibility of launching multiple instances
-  uclient-fetch '​http://​exopenwrt.roland.black/​exopenwrt.pub'​ + 
-  ​opkg-key add exopenwrt.pub +  opkg update 
-  ​echo '/etc/opkg/​keys/​1a929a1dd62138c1'​ >> /​etc/​sysupgrade.conf +  opkg install dnscrypt-proxy
-  ​echo '​src/​gz exopenwrt http://​exopenwrt.roland.black/​snapshots/​trunk/​ar71xx/​packages/​exopenwrt'​ >> /etc/opkg/​customfeeds.conf+
  
-Chaos Calmer:+**Chaos Calmer:**
  
   cd /tmp   cd /tmp
Line 50: Line 49:
   echo '​src/​gz exopenwrt http://​exopenwrt.roland.black/​chaos_calmer/​15.05.1/​ar71xx/​packages/​exopenwrt'​ >> /​etc/​opkg.conf   echo '​src/​gz exopenwrt http://​exopenwrt.roland.black/​chaos_calmer/​15.05.1/​ar71xx/​packages/​exopenwrt'​ >> /​etc/​opkg.conf
  
-Barrier Breaker:+**Barrier Breaker:**
  
-  http://​exopenwrt.roland.black/​barrier_breaker/​14.07/​ar71xx/​packages/​exopenwrt+  ​echo '​src/​gz exopenwrt ​http://​exopenwrt.roland.black/​barrier_breaker/​14.07/​ar71xx/​packages/​exopenwrt' >> /​etc/​opkg.conf
  
 And proceed with the installation itself: And proceed with the installation itself:
Line 84: Line 83:
 | ''​resolver''​ | string | no | ''​cisco''​ | DNS service for resolving queries. You can't add more than one resolver. | | ''​resolver''​ | string | no | ''​cisco''​ | DNS service for resolving queries. You can't add more than one resolver. |
 | ''​resolvers_list''​ | string | no | ''/​usr/​share/​dnscrypt-proxy/​dnscrypt-resolvers.csv''​ | Location of CSV file containing list of resolvers. When you use a custom DNSCrypt server and you later get problems when executing DNSCrypt, have a look in the resolver list (''/​usr/​share/​dnscrypt-proxy/​dnscrypt-resolvers.csv''​) and make sure the resolver you chose is listed there. If not you may need to manually add it or just update the resolver list with the [[https://​github.com/​jedisct1/​dnscrypt-proxy/​blob/​master/​dnscrypt-resolvers.csv|official one]]. Make sure to verify the integrity of the file before overwriting the local list! | | ''​resolvers_list''​ | string | no | ''/​usr/​share/​dnscrypt-proxy/​dnscrypt-resolvers.csv''​ | Location of CSV file containing list of resolvers. When you use a custom DNSCrypt server and you later get problems when executing DNSCrypt, have a look in the resolver list (''/​usr/​share/​dnscrypt-proxy/​dnscrypt-resolvers.csv''​) and make sure the resolver you chose is listed there. If not you may need to manually add it or just update the resolver list with the [[https://​github.com/​jedisct1/​dnscrypt-proxy/​blob/​master/​dnscrypt-resolvers.csv|official one]]. Make sure to verify the integrity of the file before overwriting the local list! |
-| ''​ephemeral_keys''​ | boolean | no | ''​0''​ | Improve privacy by using an ephemeral public key for each query. Note that you cannot yet use it with current ​versions ​of OpenWrt as the dnscrypt-proxy package is outdated and uses a version of DNSCrypt, which does not support ephemeral keys. Ephemeral keys option requires extra CPU cycles (especially on non-x86 platforms) and can cause huge system load. Disable it in case of performance problems. Also this option is useless with most DNSCrypt servers (all the servers using short TTLs for the certificates,​ which is done by default in the Docker image). |+| ''​ephemeral_keys''​ | boolean | no | ''​0''​ | Improve privacy by using an ephemeral public key for each query. Note that you cannot yet use it with current ​(Chaos Calmer) version ​of OpenWrt as the dnscrypt-proxy package is outdated and uses a version of DNSCrypt, which does not support ephemeral keys. Ephemeral keys option requires extra CPU cycles (especially on non-x86 platforms) and can cause huge system load. Disable it in case of performance problems. Also this option is useless with most DNSCrypt servers (all the servers using short TTLs for the certificates,​ which is done by default in the Docker image). | 
 + 
 +This options are only supported by Trunk: 
 + 
 +^ Name ^ Type ^ Required ^ Default ^ Description ^ 
 +| ''​client_key''​ | string | no | //none// | Use a client public key for identification. By default, the client uses a randomized key pair in order to make tracking more difficult. This option does the opposite and uses a static key pair, so that DNS providers can offer premium services to queries signed with a known set of public keys. A client cannot decrypt the received responses without also knowing the secret key. The value for this property is the path to a file containing the secret key. The corresponding public key is computed automatically | 
 +| ''​syslog''​ | boolean | no | ''​1''​ | Send logs to the syslog daemon | 
 +| ''​syslog_prefix''​ | string | no | ''​dnscrypt-proxy''​ | Log entries can optionally be prefixed with a string | 
 + 
 +This options are not supported (at this moment), because DNSCrypt compiled without plugins support: 
 + 
 +^ Name ^ Type ^ Required ^ Default ^ Description ^ 
 +| ''​query_log_file''​ | string | no | //none// | Log the received DNS queries to a file, so you can watch in real-time what is happening on the network. The value for this parameter is a full path to the log file. The file name can be prefixed with ltsv: in order to store logs using the LTSV format (ex: ltsv:/​tmp/​dns-queries.log) | 
 +| ''​local_cache''​ | boolean | no | ''​0''​ | Enable cache may speed up dnscrypt-proxy,​ see https://​github.com/​jedisct1/​dnscrypt-proxy/​wiki/​Go-faster | 
 +| ''​block_ipv6''​ | boolean | no | ''​0''​ | Disable IPv6 may also speed up dnscrypt-proxy,​ see https://​github.com/​jedisct1/​dnscrypt-proxy/​wiki/​Go-faster | 
 +| ''​list blacklist''​ | string | no | //none// | Blacklists allow you to block domains, ip, ... see https://​github.com/​jedisct1/​dnscrypt-proxy/​wiki/​Filtering. The value for this property is the blocklist type and path to file (ex: domains:/​path/​to/​domains-blacklist-file.txt or ips:/​path/​to/​ips-blacklist-file.txt). You can specify several blocklists by adding several ''​list blacklist''​ options. |
  
 If you need to specify other options, you will have to edit the ''/​etc/​init.d/​dnscrypt-proxy''​ script. If you need to specify other options, you will have to edit the ''/​etc/​init.d/​dnscrypt-proxy''​ script.
Line 134: Line 148:
 |{{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} This option is not available in Chaos Calmer and earlier| |{{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} This option is not available in Chaos Calmer and earlier|
  
-Add more resolver entries to your /​etc/​config/​dnscrypt-proxy configuration:​+Multiple DNSCrypt instances is helpful to provide dnsmasq with a fallback nameserver without losing the privacy benefits of DNSCrypt ([[https://​wuffleton.com/​hacks/​dnscrypt-openwrt/​|source]]). 
 + 
 +Add more resolver entries to your ''​/​etc/​config/​dnscrypt-proxy'' ​configuration ​(note that each resolver must be on a different port):
  
 |''​ config dnscrypt-proxy ns1 |''​ config dnscrypt-proxy ns1
Line 150: Line 166:
  # option ephemeral_keys '​0'​  # option ephemeral_keys '​0'​
 ''​| ''​|
- 
  
 Create ''/​etc/​resolv-crypt.conf''​ with a single line **options timeout:​1**. This will reduce dnsmasq'​s upstream timeout to 1 second, so resolution will be more responsive if your primary nameserver is down. Create ''/​etc/​resolv-crypt.conf''​ with a single line **options timeout:​1**. This will reduce dnsmasq'​s upstream timeout to 1 second, so resolution will be more responsive if your primary nameserver is down.
Line 156: Line 171:
 In your **config dnsmasq** section of your ''/​​etc/​​config/​​dhcp'',​ remove the line **option noresolv 1** and add **option resolvfile '/​etc/​resolv-crypt.conf'​** along with any other resolvers you created in step 1: In your **config dnsmasq** section of your ''/​​etc/​​config/​​dhcp'',​ remove the line **option noresolv 1** and add **option resolvfile '/​etc/​resolv-crypt.conf'​** along with any other resolvers you created in step 1:
  
-|'' ​    ​option resolvfile '/​etc/​resolv-crypt.conf'​+|'' ​   option resolvfile ​          ​'/​etc/​resolv-crypt.conf'​
     list server ​                '​127.0.0.1#​5353'​     list server ​                '​127.0.0.1#​5353'​
     list server ​                '​127.0.0.1#​5454'​     list server ​                '​127.0.0.1#​5454'​
     list server ​                '/​pool.ntp.org/​208.67.222.222'​     list server ​                '/​pool.ntp.org/​208.67.222.222'​
 ''​| ''​|
 +
 +Reboot router or restart ''​dnscrypt''​ and ''​dnsmasq''​ for the changes to take effect.
 +  /​etc/​init.d/​dnscrypt restart
 +  /​etc/​init.d/​dnsmasq restart
 ==== Client configuration ==== ==== Client configuration ====
 //Note: you may need admin privileges to run the commands below.// //Note: you may need admin privileges to run the commands below.//
Line 203: Line 222:
     * <​code>​Jul 1 12:00:00 openwrt daemon.info dnscrypt-proxy[1831]:​ Proxying from 127.0.0.1:​5353 to 208.67.220.220:​443</​code>​     * <​code>​Jul 1 12:00:00 openwrt daemon.info dnscrypt-proxy[1831]:​ Proxying from 127.0.0.1:​5353 to 208.67.220.220:​443</​code>​
  
 +If you have problems, check port conflict (for example, between the mDNS ZeroConf Daemon (avahi) and the default port for dnscrypt-proxy).
 ==== Suspicious certificate received ==== ==== Suspicious certificate received ====
 A "​suspicious"​ certificate can be reported: A "​suspicious"​ certificate can be reported:
inbox/dnscrypt.1478072379.txt.bz2 · Last modified: 2016/11/02 08:39 by dartraiden