Static

Test suite to validate using one of the DNS options available in an upstream server

DNS-over-HTTPS Server

Description

Configures DUT0 to connect, using DNS-over-HTTPS (DoH) over an upstream server.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.215.168.64/24
set protocols static route 0.0.0.0/0 next-hop 10.215.168.1
set service dns proxy server-name RD
set service dns proxy static RD protocol dns-over-https hash 2bf8e614357d7ffe91a319d2d25e8046a64f2d349a757e66b5e8c8ccea2231f5
set service dns proxy static RD protocol dns-over-https host name remote.dns
set service dns proxy static RD protocol dns-over-https ip 10.215.168.1
set service dns resolver local
set system certificate trust 'running://remote.dns-server.crt'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Run command system journal show | cat at DUT0 and check if output matches the following regular expressions:

^(?m)^.*\[RD\] OK \(DoH\) - rtt: \d+ms$
Show output
May 14 09:42:10.348433 osdx systemd-journald[1884]: Runtime Journal (/run/log/journal/0288f6065d6743618e90e784ba8b9df5) is 2.0M, max 15.3M, 13.2M free.
May 14 09:42:10.351226 osdx systemd-journald[1884]: Received client request to rotate journal, rotating.
May 14 09:42:10.351288 osdx systemd-journald[1884]: Vacuuming done, freed 0B of archived journals from /run/log/journal/0288f6065d6743618e90e784ba8b9df5.
May 14 09:42:10.358871 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'system journal clear'.
May 14 09:42:10.714129 osdx osdx-coredump[15480]: Deleting all coredumps in /opt/vyatta/etc/config/coredump...
May 14 09:42:10.723673 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'system coredump delete all'.
May 14 09:42:11.263509 osdx OSDxCLI[2678]: User 'admin' entered the configuration menu.
May 14 09:42:11.383827 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.64/24'.
May 14 09:42:11.439827 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
May 14 09:42:11.554891 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'show working'.
May 14 09:42:11.617739 osdx ubnt-cfgd[15498]: inactive
May 14 09:42:11.638263 osdx INFO[15506]: FRR daemons did not change
May 14 09:42:11.733957 osdx cfgd[1681]: [2678]Completed change to active configuration
May 14 09:42:11.745079 osdx OSDxCLI[2678]: User 'admin' committed the configuration.
May 14 09:42:11.770520 osdx OSDxCLI[2678]: User 'admin' left the configuration menu.
May 14 09:42:11.940208 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'.
May 14 09:42:12.138499 osdx OSDxCLI[2678]: User 'admin' entered the configuration menu.
May 14 09:42:12.224457 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set system certificate trust running://remote.dns-server.crt'.
May 14 09:42:12.333203 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy server-name RD'.
May 14 09:42:12.413743 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy static RD protocol dns-over-https host name remote.dns'.
May 14 09:42:12.519316 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy static RD protocol dns-over-https ip 10.215.168.1'.
May 14 09:42:12.645654 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy static RD protocol dns-over-https hash 2bf8e614357d7ffe91a319d2d25e8046a64f2d349a757e66b5e8c8ccea2231f5'.
May 14 09:42:12.705193 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns resolver local'.
May 14 09:42:12.829880 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'show working'.
May 14 09:42:12.930634 osdx ubnt-cfgd[15658]: inactive
May 14 09:42:12.958260 osdx INFO[15666]: FRR daemons did not change
May 14 09:42:12.971586 osdx ca-certificates[15682]: Updating certificates in /etc/ssl/certs...
May 14 09:42:13.477644 osdx ca-certificates[16686]: 1 added, 0 removed; done.
May 14 09:42:13.480411 osdx ca-certificates[16692]: Running hooks in /etc/ca-certificates/update.d...
May 14 09:42:13.483278 osdx ca-certificates[16694]: done.
May 14 09:42:13.575452 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
May 14 09:42:13.576506 osdx cfgd[1681]: [2678]Completed change to active configuration
May 14 09:42:13.583328 osdx OSDxCLI[2678]: User 'admin' committed the configuration.
May 14 09:42:13.619106 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] dnscrypt-proxy 2.0.45
May 14 09:42:13.619317 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] Network connectivity detected
May 14 09:42:13.619380 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] Dropping privileges
May 14 09:42:13.621274 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] Network connectivity detected
May 14 09:42:13.621310 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] Now listening to 127.0.0.1:53 [UDP]
May 14 09:42:13.621310 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] Now listening to 127.0.0.1:53 [TCP]
May 14 09:42:13.621337 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] Firefox workaround initialized
May 14 09:42:13.621337 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] Loading the set of cloaking rules from [/tmp/tmpmj2ziomo]
May 14 09:42:13.633936 osdx OSDxCLI[2678]: User 'admin' left the configuration menu.
May 14 09:42:13.787114 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] [RD] OK (DoH) - rtt: 120ms
May 14 09:42:13.787114 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] Server with the lowest initial latency: RD (rtt: 120ms)
May 14 09:42:13.787114 osdx dnscrypt-proxy[16751]: [2025-05-14 09:42:13] [NOTICE] dnscrypt-proxy is ready - live servers: 1

Step 3: Run command show host lookup teldat.com type A at DUT0 and check if output contains the following tokens:

teldat.com has address 19.18.17.16
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
teldat.com has address 19.18.17.16

DNS-over-HTTPS Server With Stamp

Description

Configures DUT0 to connect, using DNS-over-HTTPS (DoH) over an upstream server (generating a DNS stamp and using it to configure the connection).

Scenario

Step 1: Run command service dns proxy stamp calculate dns-over-https host-name remote.dns host-path /dns-query host-port 443 ip 10.215.168.1 hash 2bf8e614357d7ffe91a319d2d25e8046a64f2d349a757e66b5e8c8ccea2231f5 at DUT0 and expect this output:

Show output
sdns://AgAAAAAAAAAADDEwLjIxNS4xNjguMSAr-OYUNX1__pGjGdLSXoBGpk8tNJp1fma16MjM6iIx9QpyZW1vdGUuZG5zCi9kbnMtcXVlcnk

Step 2: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.215.168.64/24
set protocols static route 0.0.0.0/0 next-hop 10.215.168.1
set service dns proxy server-name RD
set service dns proxy static RD stamp 'sdns://AgAAAAAAAAAADDEwLjIxNS4xNjguMSAr-OYUNX1__pGjGdLSXoBGpk8tNJp1fma16MjM6iIx9QpyZW1vdGUuZG5zCi9kbnMtcXVlcnk'
set service dns resolver local
set system certificate trust 'running://remote.dns-server.crt'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run command system journal show | cat at DUT0 and check if output matches the following regular expressions:

^(?m)^.*\[RD\] OK \(DoH\) - rtt: \d+ms$
Show output
May 14 09:42:18.000162 osdx systemd-timedated[1890]: Changed local time to Wed 2025-05-14 09:42:18 UTC
May 14 09:42:18.001586 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'set date 2025-05-14 09:42:18'.
May 14 09:42:18.003037 osdx systemd-journald[1884]: Time jumped backwards, rotating.
May 14 09:42:18.304268 osdx systemd-journald[1884]: Runtime Journal (/run/log/journal/0288f6065d6743618e90e784ba8b9df5) is 2.0M, max 15.3M, 13.3M free.
May 14 09:42:18.307038 osdx systemd-journald[1884]: Received client request to rotate journal, rotating.
May 14 09:42:18.307085 osdx systemd-journald[1884]: Vacuuming done, freed 0B of archived journals from /run/log/journal/0288f6065d6743618e90e784ba8b9df5.
May 14 09:42:18.314898 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'system journal clear'.
May 14 09:42:18.643852 osdx osdx-coredump[18443]: Deleting all coredumps in /opt/vyatta/etc/config/coredump...
May 14 09:42:18.651666 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'system coredump delete all'.
May 14 09:42:19.142403 osdx OSDxCLI[2678]: User 'admin' entered the configuration menu.
May 14 09:42:19.222533 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.64/24'.
May 14 09:42:19.319511 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
May 14 09:42:19.392772 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'show working'.
May 14 09:42:19.496559 osdx ubnt-cfgd[18461]: inactive
May 14 09:42:19.516451 osdx INFO[18469]: FRR daemons did not change
May 14 09:42:19.622009 osdx cfgd[1681]: [2678]Completed change to active configuration
May 14 09:42:19.634686 osdx OSDxCLI[2678]: User 'admin' committed the configuration.
May 14 09:42:19.650894 osdx OSDxCLI[2678]: User 'admin' left the configuration menu.
May 14 09:42:19.797672 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'.
May 14 09:42:19.962816 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'service dns proxy stamp calculate dns-over-https host-name remote.dns host-path /dns-query host-port 443 ip 10.215.168.1 hash 2bf8e614357d7ffe91a319d2d25e8046a64f2d349a757e66b5e8c8ccea2231f5'.
May 14 09:42:20.146573 osdx OSDxCLI[2678]: User 'admin' entered the configuration menu.
May 14 09:42:20.207661 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set system certificate trust running://remote.dns-server.crt'.
May 14 09:42:20.322703 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy server-name RD'.
May 14 09:42:20.395124 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy static RD stamp sdns://AgAAAAAAAAAADDEwLjIxNS4xNjguMSAr-OYUNX1__pGjGdLSXoBGpk8tNJp1fma16MjM6iIx9QpyZW1vdGUuZG5zCi9kbnMtcXVlcnk'.
May 14 09:42:20.486577 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns resolver local'.
May 14 09:42:20.567901 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'show working'.
May 14 09:42:20.654374 osdx ubnt-cfgd[18622]: inactive
May 14 09:42:20.674773 osdx INFO[18630]: FRR daemons did not change
May 14 09:42:20.688113 osdx ca-certificates[18645]: Updating certificates in /etc/ssl/certs...
May 14 09:42:21.182419 osdx ca-certificates[19649]: 1 added, 0 removed; done.
May 14 09:42:21.185445 osdx ca-certificates[19656]: Running hooks in /etc/ca-certificates/update.d...
May 14 09:42:21.188183 osdx ca-certificates[19658]: done.
May 14 09:42:21.291321 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
May 14 09:42:21.292448 osdx cfgd[1681]: [2678]Completed change to active configuration
May 14 09:42:21.297411 osdx OSDxCLI[2678]: User 'admin' committed the configuration.
May 14 09:42:21.326134 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] dnscrypt-proxy 2.0.45
May 14 09:42:21.326315 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] Network connectivity detected
May 14 09:42:21.326419 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] Dropping privileges
May 14 09:42:21.328693 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] Network connectivity detected
May 14 09:42:21.328726 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] Now listening to 127.0.0.1:53 [UDP]
May 14 09:42:21.328726 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] Now listening to 127.0.0.1:53 [TCP]
May 14 09:42:21.328753 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] Firefox workaround initialized
May 14 09:42:21.328753 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] Loading the set of cloaking rules from [/tmp/tmp2hdwpzd8]
May 14 09:42:21.339150 osdx OSDxCLI[2678]: User 'admin' left the configuration menu.
May 14 09:42:21.485182 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] [RD] OK (DoH) - rtt: 90ms
May 14 09:42:21.485182 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] Server with the lowest initial latency: RD (rtt: 90ms)
May 14 09:42:21.485182 osdx dnscrypt-proxy[19715]: [2025-05-14 09:42:21] [NOTICE] dnscrypt-proxy is ready - live servers: 1
May 14 09:42:21.497571 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'system journal show | cat'.

Step 4: Run command show host lookup teldat.com type A at DUT0 and check if output contains the following tokens:

teldat.com has address 19.18.17.16
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
teldat.com has address 19.18.17.16

DNSCrypt Server

Description

Configures DUT0 to connect, using DNSCrypt over an upstream server.

Scenario

Step 1: Run command service dns proxy dnscrypt public-key running://dnscrypt.crt at DUT0 and expect this output:

Show output
b3:af:08:23:fb:c0:61:b4:2a:7e:86:6e:36:54:8a:11:7d:f0:b0:07:0f:22:b1:5c:98:f6:e8:28:cb:95:d1:e7

Step 2: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.215.168.64/24
set protocols static route 0.0.0.0/0 next-hop 10.215.168.1
set service dns proxy server-name RD
set service dns proxy static RD protocol dns-crypt ip 10.215.168.1
set service dns proxy static RD protocol dns-crypt port 8443
set service dns proxy static RD protocol dns-crypt provider name 2.dnscrypt-cert.remote.dns
set service dns proxy static RD protocol dns-crypt provider public-key 'b3:af:08:23:fb:c0:61:b4:2a:7e:86:6e:36:54:8a:11:7d:f0:b0:07:0f:22:b1:5c:98:f6:e8:28:cb:95:d1:e7'
set service dns resolver local
set system certificate trust 'running://remote.dns-server.crt'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run command system journal show | cat at DUT0 and check if output matches the following regular expressions:

^(?m)^.*\[RD\] OK \(DNSCrypt\) - rtt: \d+ms$
Show output
May 14 09:42:29.307662 osdx systemd-journald[1884]: Runtime Journal (/run/log/journal/0288f6065d6743618e90e784ba8b9df5) is 2.1M, max 15.3M, 13.2M free.
May 14 09:42:29.310326 osdx systemd-journald[1884]: Received client request to rotate journal, rotating.
May 14 09:42:29.310391 osdx systemd-journald[1884]: Vacuuming done, freed 0B of archived journals from /run/log/journal/0288f6065d6743618e90e784ba8b9df5.
May 14 09:42:29.319962 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'system journal clear'.
May 14 09:42:29.641814 osdx osdx-coredump[21411]: Deleting all coredumps in /opt/vyatta/etc/config/coredump...
May 14 09:42:29.649154 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'system coredump delete all'.
May 14 09:42:30.147700 osdx OSDxCLI[2678]: User 'admin' entered the configuration menu.
May 14 09:42:30.225095 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.64/24'.
May 14 09:42:30.324107 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
May 14 09:42:30.393316 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'show working'.
May 14 09:42:30.532082 osdx ubnt-cfgd[21429]: inactive
May 14 09:42:30.555109 osdx INFO[21437]: FRR daemons did not change
May 14 09:42:30.649703 osdx cfgd[1681]: [2678]Completed change to active configuration
May 14 09:42:30.661200 osdx OSDxCLI[2678]: User 'admin' committed the configuration.
May 14 09:42:30.682875 osdx OSDxCLI[2678]: User 'admin' left the configuration menu.
May 14 09:42:30.838206 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'.
May 14 09:42:30.949611 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'service dns proxy dnscrypt public-key running://dnscrypt.crt'.
May 14 09:42:31.165623 osdx OSDxCLI[2678]: User 'admin' entered the configuration menu.
May 14 09:42:31.249244 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set system certificate trust running://remote.dns-server.crt'.
May 14 09:42:31.349149 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy server-name RD'.
May 14 09:42:31.450126 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy static RD protocol dns-crypt ip 10.215.168.1'.
May 14 09:42:31.553598 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy static RD protocol dns-crypt port 8443'.
May 14 09:42:31.639394 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy static RD protocol dns-crypt provider name 2.dnscrypt-cert.remote.dns'.
May 14 09:42:31.823964 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy static RD protocol dns-crypt provider public-key b3:af:08:23:fb:c0:61:b4:2a:7e:86:6e:36:54:8a:11:7d:f0:b0:07:0f:22:b1:5c:98:f6:e8:28:cb:95:d1:e7'.
May 14 09:42:31.888585 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns resolver local'.
May 14 09:42:32.004078 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'show working'.
May 14 09:42:32.136334 osdx ubnt-cfgd[21592]: inactive
May 14 09:42:32.155396 osdx INFO[21600]: FRR daemons did not change
May 14 09:42:32.167745 osdx ca-certificates[21616]: Updating certificates in /etc/ssl/certs...
May 14 09:42:32.674753 osdx ca-certificates[22620]: 1 added, 0 removed; done.
May 14 09:42:32.677780 osdx ca-certificates[22626]: Running hooks in /etc/ca-certificates/update.d...
May 14 09:42:32.680578 osdx ca-certificates[22628]: done.
May 14 09:42:32.790656 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
May 14 09:42:32.791952 osdx cfgd[1681]: [2678]Completed change to active configuration
May 14 09:42:32.794656 osdx OSDxCLI[2678]: User 'admin' committed the configuration.
May 14 09:42:32.823501 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] dnscrypt-proxy 2.0.45
May 14 09:42:32.823703 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] Network connectivity detected
May 14 09:42:32.823771 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] Dropping privileges
May 14 09:42:32.824511 osdx OSDxCLI[2678]: User 'admin' left the configuration menu.
May 14 09:42:32.826161 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] Network connectivity detected
May 14 09:42:32.826214 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] Now listening to 127.0.0.1:53 [UDP]
May 14 09:42:32.826214 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] Now listening to 127.0.0.1:53 [TCP]
May 14 09:42:32.826246 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] Firefox workaround initialized
May 14 09:42:32.826246 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] Loading the set of cloaking rules from [/tmp/tmp0aji863t]
May 14 09:42:32.826819 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] [RD] OK (DNSCrypt) - rtt: 0ms
May 14 09:42:32.826845 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] Server with the lowest initial latency: RD (rtt: 0ms)
May 14 09:42:32.826845 osdx dnscrypt-proxy[22685]: [2025-05-14 09:42:32] [NOTICE] dnscrypt-proxy is ready - live servers: 1

Step 4: Run command show host lookup teldat.com type A at DUT0 and check if output contains the following tokens:

teldat.com has address 19.18.17.16
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
teldat.com has address 19.18.17.16

DNSCrypt Server With Stamp

Description

Configures DUT0 to connect, using DNSCrypt over an upstream server (generating a DNS stamp and using it to configure the connection).

Scenario

Step 1: Run command service dns proxy dnscrypt public-key running://dnscrypt.crt at DUT0 and expect this output:

Show output
b3:af:08:23:fb:c0:61:b4:2a:7e:86:6e:36:54:8a:11:7d:f0:b0:07:0f:22:b1:5c:98:f6:e8:28:cb:95:d1:e7

Step 2: Run command service dns proxy stamp calculate dns-crypt provider-name 2.dnscrypt-cert.remote.dns provider-key b3:af:08:23:fb:c0:61:b4:2a:7e:86:6e:36:54:8a:11:7d:f0:b0:07:0f:22:b1:5c:98:f6:e8:28:cb:95:d1:e7 ip 10.215.168.1 port 8443 at DUT0 and expect this output:

Show output
sdns://AQAAAAAAAAAAETEwLjIxNS4xNjguMTo4NDQzILOvCCP7wGG0Kn6GbjZUihF98LAHDyKxXJj26CjLldHnGjIuZG5zY3J5cHQtY2VydC5yZW1vdGUuZG5z

Step 3: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.215.168.64/24
set protocols static route 0.0.0.0/0 next-hop 10.215.168.1
set service dns proxy server-name RD
set service dns proxy static RD stamp 'sdns://AQAAAAAAAAAAETEwLjIxNS4xNjguMTo4NDQzILOvCCP7wGG0Kn6GbjZUihF98LAHDyKxXJj26CjLldHnGjIuZG5zY3J5cHQtY2VydC5yZW1vdGUuZG5z'
set service dns resolver local
set system certificate trust 'running://remote.dns-server.crt'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 4: Run command system journal show | cat at DUT0 and check if output matches the following regular expressions:

^(?m)^.*\[RD\] OK \(DNSCrypt\) - rtt: \d+ms$
Show output
May 14 09:42:38.300465 osdx systemd-journald[1884]: Runtime Journal (/run/log/journal/0288f6065d6743618e90e784ba8b9df5) is 2.1M, max 15.3M, 13.2M free.
May 14 09:42:38.303214 osdx systemd-journald[1884]: Received client request to rotate journal, rotating.
May 14 09:42:38.303263 osdx systemd-journald[1884]: Vacuuming done, freed 0B of archived journals from /run/log/journal/0288f6065d6743618e90e784ba8b9df5.
May 14 09:42:38.309536 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'system journal clear'.
May 14 09:42:38.644142 osdx osdx-coredump[24375]: Deleting all coredumps in /opt/vyatta/etc/config/coredump...
May 14 09:42:38.651637 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'system coredump delete all'.
May 14 09:42:39.127971 osdx OSDxCLI[2678]: User 'admin' entered the configuration menu.
May 14 09:42:39.207223 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.64/24'.
May 14 09:42:39.296781 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
May 14 09:42:39.394420 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'show working'.
May 14 09:42:39.489175 osdx ubnt-cfgd[24393]: inactive
May 14 09:42:39.510342 osdx INFO[24401]: FRR daemons did not change
May 14 09:42:39.603939 osdx cfgd[1681]: [2678]Completed change to active configuration
May 14 09:42:39.617766 osdx OSDxCLI[2678]: User 'admin' committed the configuration.
May 14 09:42:39.636656 osdx OSDxCLI[2678]: User 'admin' left the configuration menu.
May 14 09:42:39.785316 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'.
May 14 09:42:39.938696 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'service dns proxy dnscrypt public-key running://dnscrypt.crt'.
May 14 09:42:40.073783 osdx OSDxCLI[2678]: User 'admin' executed a new command: 'service dns proxy stamp calculate dns-crypt provider-name 2.dnscrypt-cert.remote.dns provider-key b3:af:08:23:fb:c0:61:b4:2a:7e:86:6e:36:54:8a:11:7d:f0:b0:07:0f:22:b1:5c:98:f6:e8:28:cb:95:d1:e7 ip 10.215.168.1 port 8443'.
May 14 09:42:40.220212 osdx OSDxCLI[2678]: User 'admin' entered the configuration menu.
May 14 09:42:40.280609 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set system certificate trust running://remote.dns-server.crt'.
May 14 09:42:40.380696 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy server-name RD'.
May 14 09:42:40.444956 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns proxy static RD stamp sdns://AQAAAAAAAAAAETEwLjIxNS4xNjguMTo4NDQzILOvCCP7wGG0Kn6GbjZUihF98LAHDyKxXJj26CjLldHnGjIuZG5zY3J5cHQtY2VydC5yZW1vdGUuZG5z'.
May 14 09:42:40.541185 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'set service dns resolver local'.
May 14 09:42:40.644367 osdx OSDxCLI[2678]: User 'admin' added a new cfg line: 'show working'.
May 14 09:42:40.725402 osdx ubnt-cfgd[24556]: inactive
May 14 09:42:40.745345 osdx INFO[24564]: FRR daemons did not change
May 14 09:42:40.758233 osdx ca-certificates[24580]: Updating certificates in /etc/ssl/certs...
May 14 09:42:41.258569 osdx ca-certificates[25584]: 1 added, 0 removed; done.
May 14 09:42:41.262431 osdx ca-certificates[25590]: Running hooks in /etc/ca-certificates/update.d...
May 14 09:42:41.265501 osdx ca-certificates[25592]: done.
May 14 09:42:41.367548 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
May 14 09:42:41.368957 osdx cfgd[1681]: [2678]Completed change to active configuration
May 14 09:42:41.372078 osdx OSDxCLI[2678]: User 'admin' committed the configuration.
May 14 09:42:41.390924 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] dnscrypt-proxy 2.0.45
May 14 09:42:41.391152 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] Network connectivity detected
May 14 09:42:41.391178 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] Dropping privileges
May 14 09:42:41.393240 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] Network connectivity detected
May 14 09:42:41.393280 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] Now listening to 127.0.0.1:53 [UDP]
May 14 09:42:41.393280 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] Now listening to 127.0.0.1:53 [TCP]
May 14 09:42:41.393315 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] Firefox workaround initialized
May 14 09:42:41.393315 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] Loading the set of cloaking rules from [/tmp/tmp_nyoem6y]
May 14 09:42:41.394020 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] [RD] OK (DNSCrypt) - rtt: 0ms
May 14 09:42:41.394020 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] Server with the lowest initial latency: RD (rtt: 0ms)
May 14 09:42:41.394020 osdx dnscrypt-proxy[25649]: [2025-05-14 09:42:41] [NOTICE] dnscrypt-proxy is ready - live servers: 1
May 14 09:42:41.398876 osdx OSDxCLI[2678]: User 'admin' left the configuration menu.

Step 5: Run command show host lookup teldat.com type A at DUT0 and check if output contains the following tokens:

teldat.com has address 19.18.17.16
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
teldat.com has address 19.18.17.16