Secure DNS and EFA

To achieve secure DNS communications using dnscrypt-proxy, perform the following steps.

Before you begin

Achieving secure DNS communications can be a critical aspect of a strong operational security posture. Use the open source ‘dnscrypt-proxy‘ package to bring encrypted DNS communications to EFA.

About this task


  1. Install dnscrypt-proxy by running:
    apt-get install
  2. Review the various resolvers that support encrypted DNS in the file /usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv and select one. The name of this resolver is in the first column in this file. For example, the ‘adguard-dns-ns1‘ resolver is displayed here:
    adguard-dns-ns1,"Adguard DNS 1","Remove ads and protect your computer from
  3. Edit the /etc/dnscrypt/dnscrypt-proxy.conf file, and set
    ResolverName adguard-dns-ns1
  4. Edit the /etc/systemd/system/ file and make sure the [Socket] section looks like this:
  5. Reload systemd, disable and re-enable dnscrypt-proxy.socket, and reboot:
    # systemctl daemon-reload
     # systemctl disable dncrypt-proxy.service
     # systemctl enable dnscrypt-proxy.service
     # reboot

    At this point, dnscrypt-proxy should be functioning normally. One way to verify this is to look for DNS requests on the EFA management interface (‘eth0‘ for TPVM installations of EFA). There should be no traffic on UDP port 53 because encrypted DNS traffic is sent over UDP port 443.

  6. To verify, run a sniffer on eth0, cause the system to issue a DNS lookup, and make sure there are no UDP packets on port 53. The output should look similar to this:
    # tcpdump -i eth0 -l -nn port 53 or port 443
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
    15:26:54.136556 IP > UDP, length 512
    15:26:54.151425 IP > UDP, length 304
    15:26:54.152783 IP > UDP, length 512
    15:26:54.166523 IP > UDP, length 304