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 f4497ee71a53d52ee4a7d76330057c4a3f34986666472f74c541bbcd7e41a847
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 b1ab909678a435274405a6720dafae2d51bd93780ccb8754b0b33c94c2462cd4
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.394 ms

--- 10.215.168.64 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.394/0.394/0.394/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
Mar 20 10:22:24.338968 osdx systemd-journald[1944]: Runtime Journal (/run/log/journal/e123bcf6d5be44acb5b98c152ad7b31f) is 912.0K, max 6.5M, 5.6M free.
Mar 20 10:22:24.339420 osdx systemd-journald[1944]: Received client request to rotate journal, rotating.
Mar 20 10:22:24.339468 osdx systemd-journald[1944]: Vacuuming done, freed 0B of archived journals from /run/log/journal/e123bcf6d5be44acb5b98c152ad7b31f.
Mar 20 10:22:24.350093 osdx OSDxCLI[56616]: User 'admin' executed a new command: 'system journal clear'.
Mar 20 10:22:24.591034 osdx OSDxCLI[56616]: User 'admin' executed a new command: 'system coredump delete all'.
Mar 20 10:22:25.681657 osdx OSDxCLI[56616]: User 'admin' entered the configuration menu.
Mar 20 10:22:25.765637 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Mar 20 10:22:25.848731 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Mar 20 10:22:25.943901 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set service ssh'.
Mar 20 10:22:26.017071 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'show working'.
Mar 20 10:22:26.126958 osdx ubnt-cfgd[160190]: inactive
Mar 20 10:22:26.224515 osdx INFO[160211]: FRR daemons did not change
Mar 20 10:22:26.263191 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Mar 20 10:22:26.313346 osdx WARNING[160280]: No supported link modes on interface eth0
Mar 20 10:22:26.314870 osdx modulelauncher[160280]: osdx.utils.xos cmd error: /sbin/ethtool -A eth0 autoneg on
Mar 20 10:22:26.314887 osdx modulelauncher[160280]: Command '/sbin/ethtool -A eth0 autoneg on' returned non-zero exit status 76.
Mar 20 10:22:26.316153 osdx modulelauncher[160280]: osdx.utils.xos cmd error: /sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off --
Mar 20 10:22:26.316166 osdx modulelauncher[160280]: Command '/sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off --' returned non-zero exit status 75.
Mar 20 10:22:26.415676 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Mar 20 10:22:26.431713 osdx sshd[160346]: Server listening on 0.0.0.0 port 22.
Mar 20 10:22:26.431747 osdx sshd[160346]: Server listening on :: port 22.
Mar 20 10:22:26.431879 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Mar 20 10:22:26.433483 osdx cfgd[1619]: [56616]Completed change to active configuration
Mar 20 10:22:26.449386 osdx OSDxCLI[56616]: User 'admin' committed the configuration.
Mar 20 10:22:26.478471 osdx OSDxCLI[56616]: User 'admin' left the configuration menu.
Mar 20 10:22:26.625265 osdx OSDxCLI[56616]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Mar 20 10:22:28.735449 osdx OSDxCLI[56616]: User 'admin' entered the configuration menu.
Mar 20 10:22:28.813793 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Mar 20 10:22:28.910464 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Mar 20 10:22:28.968675 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Mar 20 10:22:29.080569 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Mar 20 10:22:29.134906 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Mar 20 10:22:29.239972 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Mar 20 10:22:29.297096 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash b1ab909678a435274405a6720dafae2d51bd93780ccb8754b0b33c94c2462cd4'.
Mar 20 10:22:29.387857 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Mar 20 10:22:29.444755 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Mar 20 10:22:29.554216 osdx OSDxCLI[56616]: User 'admin' added a new cfg line: 'show working'.
Mar 20 10:22:29.628268 osdx ubnt-cfgd[160395]: inactive
Mar 20 10:22:29.654064 osdx INFO[160403]: FRR daemons did not change
Mar 20 10:22:29.684294 osdx ca-certificates[160419]: Updating certificates in /etc/ssl/certs...
Mar 20 10:22:30.286337 osdx ubnt-cfgd[161431]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Mar 20 10:22:30.297043 osdx ca-certificates[161435]: 1 added, 0 removed; done.
Mar 20 10:22:30.300147 osdx ca-certificates[161443]: Running hooks in /etc/ca-certificates/update.d...
Mar 20 10:22:30.303947 osdx ca-certificates[161445]: done.
Mar 20 10:22:30.423403 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Mar 20 10:22:30.425030 osdx cfgd[1619]: [56616]Completed change to active configuration
Mar 20 10:22:30.429003 osdx OSDxCLI[56616]: User 'admin' committed the configuration.
Mar 20 10:22:30.445451 osdx OSDxCLI[56616]: User 'admin' left the configuration menu.
Mar 20 10:22:30.642297 osdx OSDxCLI[56616]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Mar 20 10:22:30.646248 osdx dnscrypt-proxy[161504]: dnscrypt-proxy 2.0.45
Mar 20 10:22:30.646296 osdx dnscrypt-proxy[161504]: Network connectivity detected
Mar 20 10:22:30.646478 osdx dnscrypt-proxy[161504]: Dropping privileges
Mar 20 10:22:30.648733 osdx dnscrypt-proxy[161504]: Network connectivity detected
Mar 20 10:22:30.648763 osdx dnscrypt-proxy[161504]: Now listening to 127.0.0.1:53 [UDP]
Mar 20 10:22:30.648768 osdx dnscrypt-proxy[161504]: Now listening to 127.0.0.1:53 [TCP]
Mar 20 10:22:30.648789 osdx dnscrypt-proxy[161504]: Firefox workaround initialized
Mar 20 10:22:30.648794 osdx dnscrypt-proxy[161504]: Loading the set of cloaking rules from [/tmp/tmpq802s2jq]
Mar 20 10:22:30.856046 osdx dnscrypt-proxy[161504]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Mar 20 10:22:30.856060 osdx dnscrypt-proxy[161504]: [DUT0] OK (DoH) - rtt: 11ms
Mar 20 10:22:30.856069 osdx dnscrypt-proxy[161504]: Server with the lowest initial latency: DUT0 (rtt: 11ms)
Mar 20 10:22:30.856073 osdx dnscrypt-proxy[161504]: dnscrypt-proxy is ready - live servers: 1
Mar 20 10:22:35.749726 osdx OSDxCLI[56616]: User 'admin' entered an invalid command: 'show host lookup teldat.com type A'.
Mar 20 10:22:45.876446 osdx OSDxCLI[56616]: User 'admin' executed a new command: 'show host lookup teldat.com type A'.