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 ce5bfb07edc17945305c52b77f54ddda93ca3edba3b5213add895927eb42f82a
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 1798333557d66f5a820a13a3854c38ffed830393b59552ae7419f80b203aa630
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
Jun 23 07:58:28.269606 osdx systemd-journald[1537]: Runtime Journal (/run/log/journal/904066e2ce1346e1b59b092eb2722774) is 1.0M, max 7.2M, 6.2M free.
Jun 23 07:58:28.271376 osdx systemd-journald[1537]: Received client request to rotate journal, rotating.
Jun 23 07:58:28.271429 osdx systemd-journald[1537]: Vacuuming done, freed 0B of archived journals from /run/log/journal/904066e2ce1346e1b59b092eb2722774.
Jun 23 07:58:28.281062 osdx OSDxCLI[1792]: User 'admin' executed a new command: 'system journal clear'.
Jun 23 07:58:28.480073 osdx OSDxCLI[1792]: User 'admin' executed a new command: 'system coredump delete all'.
Jun 23 07:58:29.570156 osdx OSDxCLI[1792]: User 'admin' entered the configuration menu.
Jun 23 07:58:29.705505 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Jun 23 07:58:29.763564 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Jun 23 07:58:29.859254 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set service ssh'.
Jun 23 07:58:29.936740 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'show working'.
Jun 23 07:58:30.047720 osdx INFO[70860]: FRR daemons did not change
Jun 23 07:58:30.067369 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Jun 23 07:58:30.223622 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Jun 23 07:58:30.236676 osdx sshd[70930]: Server listening on 0.0.0.0 port 22.
Jun 23 07:58:30.236909 osdx sshd[70930]: Server listening on :: port 22.
Jun 23 07:58:30.237044 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Jun 23 07:58:30.257072 osdx cfgd[1243]: [1792]Completed change to active configuration
Jun 23 07:58:30.283159 osdx OSDxCLI[1792]: User 'admin' committed the configuration.
Jun 23 07:58:30.305897 osdx OSDxCLI[1792]: User 'admin' left the configuration menu.
Jun 23 07:58:30.461520 osdx OSDxCLI[1792]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Jun 23 07:58:32.229204 osdx OSDxCLI[1792]: User 'admin' entered the configuration menu.
Jun 23 07:58:32.291345 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Jun 23 07:58:32.390611 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Jun 23 07:58:32.449659 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Jun 23 07:58:32.566169 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Jun 23 07:58:32.622474 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Jun 23 07:58:32.726597 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Jun 23 07:58:32.814068 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 1798333557d66f5a820a13a3854c38ffed830393b59552ae7419f80b203aa630'.
Jun 23 07:58:32.918022 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Jun 23 07:58:33.011729 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Jun 23 07:58:33.092029 osdx OSDxCLI[1792]: User 'admin' added a new cfg line: 'show working'.
Jun 23 07:58:33.190307 osdx INFO[70989]: FRR daemons did not change
Jun 23 07:58:33.202719 osdx ca-certificates[71005]: Updating certificates in /etc/ssl/certs...
Jun 23 07:58:33.654535 osdx ubnt-cfgd[72003]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Jun 23 07:58:33.662721 osdx ca-certificates[72010]: 1 added, 0 removed; done.
Jun 23 07:58:33.665848 osdx ca-certificates[72015]: Running hooks in /etc/ca-certificates/update.d...
Jun 23 07:58:33.669046 osdx ca-certificates[72017]: done.
Jun 23 07:58:33.803878 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Jun 23 07:58:33.805552 osdx cfgd[1243]: [1792]Completed change to active configuration
Jun 23 07:58:33.808594 osdx OSDxCLI[1792]: User 'admin' committed the configuration.
Jun 23 07:58:33.826531 osdx dnscrypt-proxy[72077]: dnscrypt-proxy 2.0.45
Jun 23 07:58:33.826611 osdx dnscrypt-proxy[72077]: Network connectivity detected
Jun 23 07:58:33.826869 osdx dnscrypt-proxy[72077]: Dropping privileges
Jun 23 07:58:33.829457 osdx dnscrypt-proxy[72077]: Network connectivity detected
Jun 23 07:58:33.829492 osdx dnscrypt-proxy[72077]: Now listening to 127.0.0.1:53 [UDP]
Jun 23 07:58:33.829498 osdx dnscrypt-proxy[72077]: Now listening to 127.0.0.1:53 [TCP]
Jun 23 07:58:33.829521 osdx dnscrypt-proxy[72077]: Firefox workaround initialized
Jun 23 07:58:33.829526 osdx dnscrypt-proxy[72077]: Loading the set of cloaking rules from [/tmp/tmpkauvbmvf]
Jun 23 07:58:33.839773 osdx OSDxCLI[1792]: User 'admin' left the configuration menu.
Jun 23 07:58:33.991509 osdx OSDxCLI[1792]: User 'admin' executed a new command: 'system journal show | cat'.
Jun 23 07:58:36.019153 osdx dnscrypt-proxy[72077]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Jun 23 07:58:36.019495 osdx dnscrypt-proxy[72077]: [DUT0] OK (DoH) - rtt: 121ms
Jun 23 07:58:36.019546 osdx dnscrypt-proxy[72077]: Server with the lowest initial latency: DUT0 (rtt: 121ms)
Jun 23 07:58:36.019586 osdx dnscrypt-proxy[72077]: dnscrypt-proxy is ready - live servers: 1