Cipher Server

Test suite to validate using one or multiple ciphers to protect DoH connection

TLS v1.3 Connection

Description

Sets up the DUT0 as a server, DUT1 as a client and ensures the communication between them is secured by TLS v1.3.

Scenario

Step 1: Set the following configuration in DUT0:

set system certificate trust running://remote.dns-server.crt
set service dns proxy server-name RD
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 proxy static RD protocol dns-over-https hash 563c4f02c5ec6eb3d02a1ff7b1e2ca38884464e5e7e227ba087ee6524ee6fbac
set service dns proxy server cert file 'running://dns.dut0.crt'
set service dns proxy server cert key 'running://dns.dut0.key'
set service dns static host-name teldat.com inet 10.11.12.13

Step 2: Set the following configuration in DUT1:

set service dns static host-name dns.dut0 inet 10.215.168.64
set system certificate trust running://CA.crt
set service dns proxy server-name DUT0
set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0
set service dns proxy static DUT0 protocol dns-over-https host port 3000
set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64
set service dns proxy static DUT0 protocol dns-over-https hash bb81dc1859b70d889425bbed1e341bd11900d60064f7b9fc2ff83f2cc9c5fd52
set service dns proxy log level 0
set service dns resolver local

Step 3: Run command system journal show | cat at DUT1 and expect this output:

Show output
-- Logs begin at Wed 2023-12-13 01:03:26 UTC, end at Wed 2023-12-13 01:03:34 UTC. --
Dec 13 01:03:26.418832 osdx systemd-journald[1327]: Runtime journal (/run/log/journal/8bc264c4220f423fbae87c3191371490) is 2.4M, max 9.7M, 7.3M free.
Dec 13 01:03:26.433987 osdx OSDxCLI[1421]: User 'admin' executed a new command: 'system journal clear'.
Dec 13 01:03:27.350468 osdx osdx-coredump[11389]: Deleting all coredumps in /opt/vyatta/etc/config/coredump...
Dec 13 01:03:27.360152 osdx OSDxCLI[1421]: User 'admin' executed a new command: 'system coredump delete all'.
Dec 13 01:03:28.914498 osdx OSDxCLI[1421]: User 'admin' entered the configuration menu.
Dec 13 01:03:29.055697 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Dec 13 01:03:29.177101 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Dec 13 01:03:29.264632 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set service ssh'.
Dec 13 01:03:29.415879 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Dec 13 01:03:29.596232 osdx systemd[1]: Starting OpenBSD Secure Shell server...
Dec 13 01:03:29.614992 osdx sshd[11486]: Server listening on 0.0.0.0 port 22.
Dec 13 01:03:29.615312 osdx sshd[11486]: Server listening on :: port 22.
Dec 13 01:03:29.615463 osdx systemd[1]: Started OpenBSD Secure Shell server.
Dec 13 01:03:29.633640 osdx cfgd[985]: [1421]Completed change to active configuration
Dec 13 01:03:29.690129 osdx OSDxCLI[1421]: User 'admin' committed the configuration.
Dec 13 01:03:29.735762 osdx OSDxCLI[1421]: User 'admin' left the configuration menu.
Dec 13 01:03:29.897689 osdx OSDxCLI[1421]: User 'admin' executed a new command: 'ping 10.215.168.64      count 1 size 56 timeout 1'.
Dec 13 01:03:32.064149 osdx OSDxCLI[1421]: User 'admin' entered the configuration menu.
Dec 13 01:03:32.189375 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Dec 13 01:03:32.281440 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Dec 13 01:03:32.379078 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Dec 13 01:03:32.478528 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Dec 13 01:03:32.572985 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Dec 13 01:03:32.690246 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Dec 13 01:03:32.813484 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash bb81dc1859b70d889425bbed1e341bd11900d60064f7b9fc2ff83f2cc9c5fd52'.
Dec 13 01:03:32.926037 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Dec 13 01:03:33.022199 osdx OSDxCLI[1421]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Dec 13 01:03:33.161770 osdx ca-certificates[11551]: Updating certificates in /etc/ssl/certs...
Dec 13 01:03:33.910400 osdx ca-certificates[12535]: 1 added, 0 removed; done.
Dec 13 01:03:33.919595 osdx ca-certificates[12539]: Running hooks in /etc/ca-certificates/update.d...
Dec 13 01:03:33.927906 osdx ca-certificates[12543]: done.
Dec 13 01:03:34.093626 osdx systemd[1]: Started DNSCrypt client proxy.
Dec 13 01:03:34.096929 osdx cfgd[985]: [1421]Completed change to active configuration
Dec 13 01:03:34.106046 osdx OSDxCLI[1421]: User 'admin' committed the configuration.
Dec 13 01:03:34.132425 osdx OSDxCLI[1421]: User 'admin' left the configuration menu.
Dec 13 01:03:34.142223 osdx dnscrypt-proxy[12596]: dnscrypt-proxy 2.0.45
Dec 13 01:03:34.142666 osdx dnscrypt-proxy[12596]: Network connectivity detected
Dec 13 01:03:34.143273 osdx dnscrypt-proxy[12596]: Dropping privileges
Dec 13 01:03:34.146182 osdx dnscrypt-proxy[12596]: Network connectivity detected
Dec 13 01:03:34.146529 osdx dnscrypt-proxy[12596]: Now listening to 127.0.0.1:53 [UDP]
Dec 13 01:03:34.146633 osdx dnscrypt-proxy[12596]: Now listening to 127.0.0.1:53 [TCP]
Dec 13 01:03:34.146743 osdx dnscrypt-proxy[12596]: Firefox workaround initialized
Dec 13 01:03:34.146822 osdx dnscrypt-proxy[12596]: Loading the set of cloaking rules from [/tmp/tmpsVFh4D]
Dec 13 01:03:34.342955 osdx OSDxCLI[1421]: User 'admin' executed a new command: 'system journal show | cat'.
Dec 13 01:03:34.387148 osdx dnscrypt-proxy[12596]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Dec 13 01:03:34.387166 osdx dnscrypt-proxy[12596]: [DUT0] OK (DoH) - rtt: 131ms
Dec 13 01:03:34.387178 osdx dnscrypt-proxy[12596]: Server with the lowest initial latency: DUT0 (rtt: 131ms)
Dec 13 01:03:34.387185 osdx dnscrypt-proxy[12596]: dnscrypt-proxy is ready - live servers: 1