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 f8bc50bc5ac15ce0f76e30e6a004a073889a788f693866f15b90a61d26d26c4f
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 8a8cd9aadf7f141793f12e96db6b9dfb2c9cb96f8508a518c210304619aa58f2
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 2024-10-09 08:49:44 UTC, end at Wed 2024-10-09 08:49:49 UTC. --
Oct 09 08:49:44.258725 osdx systemd-journald[1561]: Runtime journal (/run/log/journal/eaeccd0c3bff4a7aaed4833a9adb570d) is 1.2M, max 9.7M, 8.5M free.
Oct 09 08:49:44.267159 osdx OSDxCLI[9127]: User 'admin' executed a new command: 'system journal clear'.
Oct 09 08:49:44.805446 osdx osdx-coredump[12839]: Deleting all coredumps in /opt/vyatta/etc/config/coredump...
Oct 09 08:49:44.811700 osdx OSDxCLI[9127]: User 'admin' executed a new command: 'system coredump delete all'.
Oct 09 08:49:45.755732 osdx OSDxCLI[9127]: User 'admin' entered the configuration menu.
Oct 09 08:49:45.823326 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Oct 09 08:49:45.908863 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Oct 09 08:49:45.958569 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set service ssh'.
Oct 09 08:49:46.085351 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Oct 09 08:49:46.209485 osdx systemd[1]: Starting OpenBSD Secure Shell server...
Oct 09 08:49:46.220699 osdx sshd[12936]: Server listening on 0.0.0.0 port 22.
Oct 09 08:49:46.220917 osdx sshd[12936]: Server listening on :: port 22.
Oct 09 08:49:46.221025 osdx systemd[1]: Started OpenBSD Secure Shell server.
Oct 09 08:49:46.235147 osdx cfgd[1199]: [9127]Completed change to active configuration
Oct 09 08:49:46.267718 osdx OSDxCLI[9127]: User 'admin' committed the configuration.
Oct 09 08:49:46.282435 osdx OSDxCLI[9127]: User 'admin' left the configuration menu.
Oct 09 08:49:46.414397 osdx OSDxCLI[9127]: User 'admin' executed a new command: 'ping 10.215.168.64      count 1 size 56 timeout 1'.
Oct 09 08:49:47.898928 osdx OSDxCLI[9127]: User 'admin' entered the configuration menu.
Oct 09 08:49:47.956022 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Oct 09 08:49:48.053296 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Oct 09 08:49:48.102079 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Oct 09 08:49:48.215322 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Oct 09 08:49:48.265879 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Oct 09 08:49:48.361736 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Oct 09 08:49:48.420856 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 8a8cd9aadf7f141793f12e96db6b9dfb2c9cb96f8508a518c210304619aa58f2'.
Oct 09 08:49:48.500364 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Oct 09 08:49:48.552785 osdx OSDxCLI[9127]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Oct 09 08:49:48.677448 osdx ca-certificates[13001]: Updating certificates in /etc/ssl/certs...
Oct 09 08:49:49.060767 osdx ca-certificates[13985]: 1 added, 0 removed; done.
Oct 09 08:49:49.064775 osdx ca-certificates[13988]: Running hooks in /etc/ca-certificates/update.d...
Oct 09 08:49:49.068364 osdx ca-certificates[13992]: done.
Oct 09 08:49:49.150553 osdx systemd[1]: Started DNSCrypt client proxy.
Oct 09 08:49:49.152588 osdx cfgd[1199]: [9127]Completed change to active configuration
Oct 09 08:49:49.158530 osdx OSDxCLI[9127]: User 'admin' committed the configuration.
Oct 09 08:49:49.169974 osdx dnscrypt-proxy[14046]: dnscrypt-proxy 2.0.45
Oct 09 08:49:49.170221 osdx dnscrypt-proxy[14046]: Network connectivity detected
Oct 09 08:49:49.170505 osdx dnscrypt-proxy[14046]: Dropping privileges
Oct 09 08:49:49.172131 osdx dnscrypt-proxy[14046]: Network connectivity detected
Oct 09 08:49:49.172306 osdx dnscrypt-proxy[14046]: Now listening to 127.0.0.1:53 [UDP]
Oct 09 08:49:49.172344 osdx dnscrypt-proxy[14046]: Now listening to 127.0.0.1:53 [TCP]
Oct 09 08:49:49.172396 osdx dnscrypt-proxy[14046]: Firefox workaround initialized
Oct 09 08:49:49.172432 osdx dnscrypt-proxy[14046]: Loading the set of cloaking rules from [/tmp/tmpJL4Pa7]
Oct 09 08:49:49.181320 osdx OSDxCLI[9127]: User 'admin' left the configuration menu.
Oct 09 08:49:49.317337 osdx OSDxCLI[9127]: User 'admin' executed a new command: 'system journal show | cat'.
Oct 09 08:49:49.337883 osdx dnscrypt-proxy[14046]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Oct 09 08:49:49.337895 osdx dnscrypt-proxy[14046]: [DUT0] OK (DoH) - rtt: 122ms
Oct 09 08:49:49.337903 osdx dnscrypt-proxy[14046]: Server with the lowest initial latency: DUT0 (rtt: 122ms)
Oct 09 08:49:49.337908 osdx dnscrypt-proxy[14046]: dnscrypt-proxy is ready - live servers: 1