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 0c3fb81532735401c3af3963a49608857bea018fbc7d64aefccd5a61f1a252c5
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
Mar 24 12:06:03.327699 osdx systemd-journald[1562]: Runtime Journal (/run/log/journal/4697983b28394fbab81ced9284dd096a) is 900.0K, max 6.5M, 5.6M free.
Mar 24 12:06:03.328654 osdx systemd-journald[1562]: Received client request to rotate journal, rotating.
Mar 24 12:06:03.328720 osdx systemd-journald[1562]: Vacuuming done, freed 0B of archived journals from /run/log/journal/4697983b28394fbab81ced9284dd096a.
Mar 24 12:06:03.339354 osdx OSDxCLI[198564]: User 'admin' executed a new command: 'system journal clear'.
Mar 24 12:06:03.537168 osdx OSDxCLI[198564]: User 'admin' executed a new command: 'system coredump delete all'.
Mar 24 12:06:04.478791 osdx OSDxCLI[198564]: User 'admin' entered the configuration menu.
Mar 24 12:06:04.644084 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Mar 24 12:06:04.715510 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Mar 24 12:06:04.775143 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set service ssh'.
Mar 24 12:06:04.906636 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'show working'.
Mar 24 12:06:04.981619 osdx ubnt-cfgd[240738]: inactive
Mar 24 12:06:05.035782 osdx INFO[240752]: FRR daemons did not change
Mar 24 12:06:05.064404 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Mar 24 12:06:05.248858 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Mar 24 12:06:05.260586 osdx sshd[240866]: Server listening on 0.0.0.0 port 22.
Mar 24 12:06:05.260822 osdx sshd[240866]: Server listening on :: port 22.
Mar 24 12:06:05.260965 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Mar 24 12:06:05.285211 osdx cfgd[1263]: [198564]Completed change to active configuration
Mar 24 12:06:05.296981 osdx OSDxCLI[198564]: User 'admin' committed the configuration.
Mar 24 12:06:05.315607 osdx OSDxCLI[198564]: User 'admin' left the configuration menu.
Mar 24 12:06:05.513552 osdx OSDxCLI[198564]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Mar 24 12:06:07.433478 osdx OSDxCLI[198564]: User 'admin' entered the configuration menu.
Mar 24 12:06:07.494592 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Mar 24 12:06:07.599150 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Mar 24 12:06:07.654881 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Mar 24 12:06:07.765245 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Mar 24 12:06:07.825378 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Mar 24 12:06:07.924560 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Mar 24 12:06:07.986336 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 0c3fb81532735401c3af3963a49608857bea018fbc7d64aefccd5a61f1a252c5'.
Mar 24 12:06:08.100415 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Mar 24 12:06:08.196543 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Mar 24 12:06:08.265208 osdx OSDxCLI[198564]: User 'admin' added a new cfg line: 'show working'.
Mar 24 12:06:08.365770 osdx ubnt-cfgd[240923]: inactive
Mar 24 12:06:08.388169 osdx INFO[240931]: FRR daemons did not change
Mar 24 12:06:08.402109 osdx ca-certificates[240947]: Updating certificates in /etc/ssl/certs...
Mar 24 12:06:08.870687 osdx ubnt-cfgd[241945]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Mar 24 12:06:08.879386 osdx ca-certificates[241952]: 1 added, 0 removed; done.
Mar 24 12:06:08.882591 osdx ca-certificates[241957]: Running hooks in /etc/ca-certificates/update.d...
Mar 24 12:06:08.885602 osdx ca-certificates[241959]: done.
Mar 24 12:06:08.996820 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Mar 24 12:06:08.998952 osdx cfgd[1263]: [198564]Completed change to active configuration
Mar 24 12:06:09.002601 osdx OSDxCLI[198564]: User 'admin' committed the configuration.
Mar 24 12:06:09.020820 osdx dnscrypt-proxy[242017]: dnscrypt-proxy 2.0.45
Mar 24 12:06:09.020877 osdx dnscrypt-proxy[242017]: Network connectivity detected
Mar 24 12:06:09.021061 osdx dnscrypt-proxy[242017]: Dropping privileges
Mar 24 12:06:09.023690 osdx dnscrypt-proxy[242017]: Network connectivity detected
Mar 24 12:06:09.023907 osdx dnscrypt-proxy[242017]: Now listening to 127.0.0.1:53 [UDP]
Mar 24 12:06:09.023952 osdx dnscrypt-proxy[242017]: Now listening to 127.0.0.1:53 [TCP]
Mar 24 12:06:09.024001 osdx dnscrypt-proxy[242017]: Firefox workaround initialized
Mar 24 12:06:09.024041 osdx dnscrypt-proxy[242017]: Loading the set of cloaking rules from [/tmp/tmp67y5zkxc]
Mar 24 12:06:09.027950 osdx OSDxCLI[198564]: User 'admin' left the configuration menu.
Mar 24 12:06:09.118310 osdx dnscrypt-proxy[242017]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Mar 24 12:06:09.118323 osdx dnscrypt-proxy[242017]: [DUT0] OK (DoH) - rtt: 13ms
Mar 24 12:06:09.118331 osdx dnscrypt-proxy[242017]: Server with the lowest initial latency: DUT0 (rtt: 13ms)
Mar 24 12:06:09.118335 osdx dnscrypt-proxy[242017]: dnscrypt-proxy is ready - live servers: 1