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 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 cert file 'running://dns.dut0.crt'
set service dns proxy server cert key 'running://dns.dut0.key'
set service dns proxy server-name RD
set service dns proxy static RD protocol dns-over-https hash 3da01845fbcfc1579f9eca2d995ba22ecb78951c4fead8f8e986fc6d1e954848
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 static host-name teldat.com inet 10.11.12.13
set system certificate trust 'running://remote.dns-server.crt'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 10.215.168.65/24
set protocols static route 0.0.0.0/0 next-hop 10.215.168.1
set service dns proxy log level 0
set service dns proxy server-name DUT0
set service dns proxy static DUT0 protocol dns-over-https hash a8d0a835adc36b90da4e9cf19cf1a0b9590217062a4da7c428a374fbc3e73b80
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 resolver local
set service dns static host-name dns.dut0 inet 10.215.168.64
set service ssh
set system certificate trust 'running://CA.crt'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

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

Show output
Nov 25 10:52:18.282517 osdx systemd-journald[1748]: Runtime Journal (/run/log/journal/c23349e7d2664277b4fe16aa8bcc979f) is 912.0K, max 6.5M, 5.6M free.
Nov 25 10:52:18.283168 osdx systemd-journald[1748]: Received client request to rotate journal, rotating.
Nov 25 10:52:18.283219 osdx systemd-journald[1748]: Vacuuming done, freed 0B of archived journals from /run/log/journal/c23349e7d2664277b4fe16aa8bcc979f.
Nov 25 10:52:18.295332 osdx OSDxCLI[2045]: User 'admin' executed a new command: 'system journal clear'.
Nov 25 10:52:18.493054 osdx OSDxCLI[2045]: User 'admin' executed a new command: 'system coredump delete all'.
Nov 25 10:52:19.476328 osdx OSDxCLI[2045]: User 'admin' entered the configuration menu.
Nov 25 10:52:19.575970 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Nov 25 10:52:19.697791 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Nov 25 10:52:19.769222 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set service ssh'.
Nov 25 10:52:19.889638 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'show working'.
Nov 25 10:52:19.972486 osdx ubnt-cfgd[64178]: inactive
Nov 25 10:52:19.998630 osdx INFO[64192]: FRR daemons did not change
Nov 25 10:52:20.019161 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Nov 25 10:52:20.187450 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Nov 25 10:52:20.201216 osdx sshd[64306]: Server listening on 0.0.0.0 port 22.
Nov 25 10:52:20.201427 osdx sshd[64306]: Server listening on :: port 22.
Nov 25 10:52:20.201545 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Nov 25 10:52:20.233532 osdx cfgd[1449]: [2045]Completed change to active configuration
Nov 25 10:52:20.248503 osdx OSDxCLI[2045]: User 'admin' committed the configuration.
Nov 25 10:52:20.265504 osdx OSDxCLI[2045]: User 'admin' left the configuration menu.
Nov 25 10:52:20.407675 osdx OSDxCLI[2045]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Nov 25 10:52:22.236876 osdx OSDxCLI[2045]: User 'admin' entered the configuration menu.
Nov 25 10:52:22.308472 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Nov 25 10:52:22.408081 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Nov 25 10:52:22.490770 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Nov 25 10:52:22.597970 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Nov 25 10:52:22.659476 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Nov 25 10:52:22.759811 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Nov 25 10:52:22.826562 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash a8d0a835adc36b90da4e9cf19cf1a0b9590217062a4da7c428a374fbc3e73b80'.
Nov 25 10:52:22.910828 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Nov 25 10:52:22.968479 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Nov 25 10:52:23.083754 osdx OSDxCLI[2045]: User 'admin' added a new cfg line: 'show working'.
Nov 25 10:52:23.149723 osdx ubnt-cfgd[64363]: inactive
Nov 25 10:52:23.172664 osdx INFO[64371]: FRR daemons did not change
Nov 25 10:52:23.185306 osdx ca-certificates[64387]: Updating certificates in /etc/ssl/certs...
Nov 25 10:52:23.627351 osdx ubnt-cfgd[65385]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Nov 25 10:52:23.634874 osdx ca-certificates[65392]: 1 added, 0 removed; done.
Nov 25 10:52:23.637946 osdx ca-certificates[65397]: Running hooks in /etc/ca-certificates/update.d...
Nov 25 10:52:23.640828 osdx ca-certificates[65399]: done.
Nov 25 10:52:23.743496 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Nov 25 10:52:23.745137 osdx cfgd[1449]: [2045]Completed change to active configuration
Nov 25 10:52:23.748839 osdx OSDxCLI[2045]: User 'admin' committed the configuration.
Nov 25 10:52:23.768366 osdx OSDxCLI[2045]: User 'admin' left the configuration menu.
Nov 25 10:52:23.769132 osdx dnscrypt-proxy[65459]: dnscrypt-proxy 2.0.45
Nov 25 10:52:23.769431 osdx dnscrypt-proxy[65459]: Network connectivity detected
Nov 25 10:52:23.769746 osdx dnscrypt-proxy[65459]: Dropping privileges
Nov 25 10:52:23.772948 osdx dnscrypt-proxy[65459]: Network connectivity detected
Nov 25 10:52:23.773216 osdx dnscrypt-proxy[65459]: Now listening to 127.0.0.1:53 [UDP]
Nov 25 10:52:23.773285 osdx dnscrypt-proxy[65459]: Now listening to 127.0.0.1:53 [TCP]
Nov 25 10:52:23.773366 osdx dnscrypt-proxy[65459]: Firefox workaround initialized
Nov 25 10:52:23.773421 osdx dnscrypt-proxy[65459]: Loading the set of cloaking rules from [/tmp/tmp5m75205h]
Nov 25 10:52:23.915557 osdx OSDxCLI[2045]: User 'admin' executed a new command: 'system journal show | cat'.
Nov 25 10:52:24.024716 osdx dnscrypt-proxy[65459]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Nov 25 10:52:24.024728 osdx dnscrypt-proxy[65459]: [DUT0] OK (DoH) - rtt: 118ms
Nov 25 10:52:24.024735 osdx dnscrypt-proxy[65459]: Server with the lowest initial latency: DUT0 (rtt: 118ms)
Nov 25 10:52:24.024739 osdx dnscrypt-proxy[65459]: dnscrypt-proxy is ready - live servers: 1