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 2a6755e80e5a7dfe3ab6d39f6dcd5b2d794b6bb929280948ea0ff2d21715f66e
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 83e1c716ed4696f65f07fe3bd2aa91d2e721051e74261239b0e5b6de3176864a
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: Ping IP address 10.215.168.64 from DUT1:

admin@DUT1$ ping 10.215.168.64 count 1 size 56 timeout 1
Show output
PING 10.215.168.64 (10.215.168.64) 56(84) bytes of data.
64 bytes from 10.215.168.64: icmp_seq=1 ttl=64 time=0.485 ms

--- 10.215.168.64 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.485/0.485/0.485/0.000 ms

Step 4: Run command show host lookup teldat.com type A at DUT1 and check if output contains the following tokens:

teldat.com has address 10.11.12.13
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
teldat.com has address 10.11.12.13

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

Show output
Apr 16 20:13:00.332674 osdx systemd-journald[1990]: Runtime Journal (/run/log/journal/17bae56bc8a84fa2b76db35ef5e507be) is 896.0K, max 6.4M, 5.6M free.
Apr 16 20:13:00.335823 osdx systemd-journald[1990]: Received client request to rotate journal, rotating.
Apr 16 20:13:00.335905 osdx systemd-journald[1990]: Vacuuming done, freed 0B of archived journals from /run/log/journal/17bae56bc8a84fa2b76db35ef5e507be.
Apr 16 20:13:00.346798 osdx OSDxCLI[110216]: User 'admin' executed a new command: 'system journal clear'.
Apr 16 20:13:00.571194 osdx OSDxCLI[110216]: User 'admin' executed a new command: 'system coredump delete all'.
Apr 16 20:13:01.660565 osdx OSDxCLI[110216]: User 'admin' entered the configuration menu.
Apr 16 20:13:01.760291 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Apr 16 20:13:01.828695 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Apr 16 20:13:01.929729 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set service ssh'.
Apr 16 20:13:01.996028 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'show working'.
Apr 16 20:13:02.081828 osdx ubnt-cfgd[448686]: inactive
Apr 16 20:13:02.158532 osdx INFO[448707]: FRR daemons did not change
Apr 16 20:13:02.187596 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Apr 16 20:13:02.235951 osdx WARNING[448776]: No supported link modes on interface eth0
Apr 16 20:13:02.237478 osdx modulelauncher[448776]: osdx.utils.xos cmd error: /sbin/ethtool -A eth0 autoneg on
Apr 16 20:13:02.237492 osdx modulelauncher[448776]: Command '/sbin/ethtool -A eth0 autoneg on' returned non-zero exit status 76.
Apr 16 20:13:02.239067 osdx modulelauncher[448776]: osdx.utils.xos cmd error: /sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off --
Apr 16 20:13:02.239078 osdx modulelauncher[448776]: Command '/sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off --' returned non-zero exit status 75.
Apr 16 20:13:02.339897 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Apr 16 20:13:02.352241 osdx sshd[448842]: Server listening on 0.0.0.0 port 22.
Apr 16 20:13:02.352266 osdx sshd[448842]: Server listening on :: port 22.
Apr 16 20:13:02.352379 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Apr 16 20:13:02.353762 osdx cfgd[1626]: [110216]Completed change to active configuration
Apr 16 20:13:02.370004 osdx OSDxCLI[110216]: User 'admin' committed the configuration.
Apr 16 20:13:02.388730 osdx OSDxCLI[110216]: User 'admin' left the configuration menu.
Apr 16 20:13:02.557206 osdx OSDxCLI[110216]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Apr 16 20:13:04.546472 osdx OSDxCLI[110216]: User 'admin' entered the configuration menu.
Apr 16 20:13:04.618366 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Apr 16 20:13:04.802050 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Apr 16 20:13:04.926584 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Apr 16 20:13:05.038625 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Apr 16 20:13:05.114343 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Apr 16 20:13:05.248808 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Apr 16 20:13:05.369303 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 83e1c716ed4696f65f07fe3bd2aa91d2e721051e74261239b0e5b6de3176864a'.
Apr 16 20:13:05.480803 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Apr 16 20:13:05.568020 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Apr 16 20:13:05.670152 osdx OSDxCLI[110216]: User 'admin' added a new cfg line: 'show working'.
Apr 16 20:13:05.805048 osdx ubnt-cfgd[448892]: inactive
Apr 16 20:13:05.835517 osdx INFO[448900]: FRR daemons did not change
Apr 16 20:13:05.852703 osdx ca-certificates[448916]: Updating certificates in /etc/ssl/certs...
Apr 16 20:13:06.489147 osdx ubnt-cfgd[449928]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Apr 16 20:13:06.497611 osdx ca-certificates[449933]: 1 added, 0 removed; done.
Apr 16 20:13:06.500757 osdx ca-certificates[449940]: Running hooks in /etc/ca-certificates/update.d...
Apr 16 20:13:06.504721 osdx ca-certificates[449942]: done.
Apr 16 20:13:06.640035 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Apr 16 20:13:06.642543 osdx cfgd[1626]: [110216]Completed change to active configuration
Apr 16 20:13:06.644973 osdx OSDxCLI[110216]: User 'admin' committed the configuration.
Apr 16 20:13:06.663438 osdx dnscrypt-proxy[450001]: dnscrypt-proxy 2.0.45
Apr 16 20:13:06.663512 osdx dnscrypt-proxy[450001]: Network connectivity detected
Apr 16 20:13:06.663917 osdx dnscrypt-proxy[450001]: Dropping privileges
Apr 16 20:13:06.666187 osdx dnscrypt-proxy[450001]: Network connectivity detected
Apr 16 20:13:06.666222 osdx dnscrypt-proxy[450001]: Now listening to 127.0.0.1:53 [UDP]
Apr 16 20:13:06.666227 osdx dnscrypt-proxy[450001]: Now listening to 127.0.0.1:53 [TCP]
Apr 16 20:13:06.666248 osdx dnscrypt-proxy[450001]: Firefox workaround initialized
Apr 16 20:13:06.666253 osdx dnscrypt-proxy[450001]: Loading the set of cloaking rules from [/tmp/tmpms269pdg]
Apr 16 20:13:06.673296 osdx OSDxCLI[110216]: User 'admin' left the configuration menu.
Apr 16 20:13:06.758147 osdx dnscrypt-proxy[450001]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Apr 16 20:13:06.758166 osdx dnscrypt-proxy[450001]: [DUT0] OK (DoH) - rtt: 12ms
Apr 16 20:13:06.758176 osdx dnscrypt-proxy[450001]: Server with the lowest initial latency: DUT0 (rtt: 12ms)
Apr 16 20:13:06.758182 osdx dnscrypt-proxy[450001]: dnscrypt-proxy is ready - live servers: 1
Apr 16 20:13:06.853237 osdx OSDxCLI[110216]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Apr 16 20:13:06.998439 osdx OSDxCLI[110216]: User 'admin' executed a new command: 'show host lookup teldat.com type A'.