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 b3833428c4eeebe8cd5ee7d2a21b89cbac88ab9a174e60074bde98877fa27e2a
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
Aug 20 10:14:44.281241 osdx systemd-journald[1745]: Runtime Journal (/run/log/journal/f1f2085982c441e58ba58c498ad9816b) is 992.0K, max 7.2M, 6.2M free.
Aug 20 10:14:44.284351 osdx systemd-journald[1745]: Received client request to rotate journal, rotating.
Aug 20 10:14:44.284417 osdx systemd-journald[1745]: Vacuuming done, freed 0B of archived journals from /run/log/journal/f1f2085982c441e58ba58c498ad9816b.
Aug 20 10:14:44.290528 osdx OSDxCLI[2016]: User 'admin' executed a new command: 'system journal clear'.
Aug 20 10:14:44.485373 osdx OSDxCLI[2016]: User 'admin' executed a new command: 'system coredump delete all'.
Aug 20 10:14:45.569402 osdx OSDxCLI[2016]: User 'admin' entered the configuration menu.
Aug 20 10:14:45.710299 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Aug 20 10:14:45.795620 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Aug 20 10:14:45.847456 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set service ssh'.
Aug 20 10:14:45.958062 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'show working'.
Aug 20 10:14:46.025888 osdx ubnt-cfgd[52613]: inactive
Aug 20 10:14:46.050592 osdx INFO[52627]: FRR daemons did not change
Aug 20 10:14:46.072323 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Aug 20 10:14:46.212531 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Aug 20 10:14:46.225626 osdx sshd[52741]: Server listening on 0.0.0.0 port 22.
Aug 20 10:14:46.225809 osdx sshd[52741]: Server listening on :: port 22.
Aug 20 10:14:46.225908 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Aug 20 10:14:46.243724 osdx cfgd[1447]: [2016]Completed change to active configuration
Aug 20 10:14:46.255015 osdx OSDxCLI[2016]: User 'admin' committed the configuration.
Aug 20 10:14:46.275507 osdx OSDxCLI[2016]: User 'admin' left the configuration menu.
Aug 20 10:14:46.418806 osdx OSDxCLI[2016]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Aug 20 10:14:48.415464 osdx OSDxCLI[2016]: User 'admin' entered the configuration menu.
Aug 20 10:14:48.478933 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Aug 20 10:14:48.575241 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Aug 20 10:14:48.632514 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Aug 20 10:14:48.740761 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Aug 20 10:14:48.801326 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Aug 20 10:14:48.900431 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Aug 20 10:14:48.974369 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash b3833428c4eeebe8cd5ee7d2a21b89cbac88ab9a174e60074bde98877fa27e2a'.
Aug 20 10:14:49.064913 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Aug 20 10:14:49.132238 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Aug 20 10:14:49.297989 osdx OSDxCLI[2016]: User 'admin' added a new cfg line: 'show working'.
Aug 20 10:14:49.378333 osdx ubnt-cfgd[52798]: inactive
Aug 20 10:14:49.401634 osdx INFO[52806]: FRR daemons did not change
Aug 20 10:14:49.414138 osdx ca-certificates[52821]: Updating certificates in /etc/ssl/certs...
Aug 20 10:14:49.880233 osdx ubnt-cfgd[53820]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Aug 20 10:14:49.888052 osdx ca-certificates[53827]: 1 added, 0 removed; done.
Aug 20 10:14:49.891132 osdx ca-certificates[53832]: Running hooks in /etc/ca-certificates/update.d...
Aug 20 10:14:49.894113 osdx ca-certificates[53834]: done.
Aug 20 10:14:50.004687 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Aug 20 10:14:50.006353 osdx cfgd[1447]: [2016]Completed change to active configuration
Aug 20 10:14:50.010143 osdx OSDxCLI[2016]: User 'admin' committed the configuration.
Aug 20 10:14:50.026376 osdx OSDxCLI[2016]: User 'admin' left the configuration menu.
Aug 20 10:14:50.037977 osdx dnscrypt-proxy[53894]: dnscrypt-proxy 2.0.45
Aug 20 10:14:50.038042 osdx dnscrypt-proxy[53894]: Network connectivity detected
Aug 20 10:14:50.038224 osdx dnscrypt-proxy[53894]: Dropping privileges
Aug 20 10:14:50.039966 osdx dnscrypt-proxy[53894]: Network connectivity detected
Aug 20 10:14:50.039998 osdx dnscrypt-proxy[53894]: Now listening to 127.0.0.1:53 [UDP]
Aug 20 10:14:50.040006 osdx dnscrypt-proxy[53894]: Now listening to 127.0.0.1:53 [TCP]
Aug 20 10:14:50.040033 osdx dnscrypt-proxy[53894]: Firefox workaround initialized
Aug 20 10:14:50.040038 osdx dnscrypt-proxy[53894]: Loading the set of cloaking rules from [/tmp/tmp1qvpj8mk]
Aug 20 10:14:50.193371 osdx OSDxCLI[2016]: User 'admin' executed a new command: 'system journal show | cat'.
Aug 20 10:14:50.263770 osdx dnscrypt-proxy[53894]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Aug 20 10:14:50.263783 osdx dnscrypt-proxy[53894]: [DUT0] OK (DoH) - rtt: 119ms
Aug 20 10:14:50.263791 osdx dnscrypt-proxy[53894]: Server with the lowest initial latency: DUT0 (rtt: 119ms)
Aug 20 10:14:50.263796 osdx dnscrypt-proxy[53894]: dnscrypt-proxy is ready - live servers: 1