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 a91e708969927d2f5720bb78c799ea1656d98ed9fbeabfca48887da4ed4634cd
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 df0a49f6bedabb7c193590b2fe55da4b7e97416d545b003fa11c808af2d5ed21
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.343 ms

--- 10.215.168.64 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.343/0.343/0.343/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 05 21:30:29.292766 osdx systemd-journald[1982]: Runtime Journal (/run/log/journal/870944ec2cb343ee825d9d66ec6747cc) is 944.0K, max 6.4M, 5.5M free.
Mar 05 21:30:29.295713 osdx systemd-journald[1982]: Received client request to rotate journal, rotating.
Mar 05 21:30:29.295763 osdx systemd-journald[1982]: Vacuuming done, freed 0B of archived journals from /run/log/journal/870944ec2cb343ee825d9d66ec6747cc.
Mar 05 21:30:29.302250 osdx OSDxCLI[632527]: User 'admin' executed a new command: 'system journal clear'.
Mar 05 21:30:29.488389 osdx OSDxCLI[632527]: User 'admin' executed a new command: 'system coredump delete all'.
Mar 05 21:30:30.442108 osdx OSDxCLI[632527]: User 'admin' entered the configuration menu.
Mar 05 21:30:30.527706 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Mar 05 21:30:30.599343 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Mar 05 21:30:30.689257 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set service ssh'.
Mar 05 21:30:30.756052 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'show working'.
Mar 05 21:30:30.847145 osdx ubnt-cfgd[678773]: inactive
Mar 05 21:30:30.918297 osdx INFO[678794]: FRR daemons did not change
Mar 05 21:30:30.947704 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Mar 05 21:30:30.996035 osdx WARNING[678863]: No supported link modes on interface eth0
Mar 05 21:30:30.997381 osdx modulelauncher[678863]: osdx.utils.xos cmd error: /sbin/ethtool -A eth0 autoneg on
Mar 05 21:30:30.997393 osdx modulelauncher[678863]: Command '/sbin/ethtool -A eth0 autoneg on' returned non-zero exit status 76.
Mar 05 21:30:30.998540 osdx modulelauncher[678863]: osdx.utils.xos cmd error: /sbin/ethtool -s eth0 autoneg on advertise Asym_Pause off Pause off --
Mar 05 21:30:30.998550 osdx modulelauncher[678863]: Command '/sbin/ethtool -s eth0 autoneg on advertise Asym_Pause off Pause off --' returned non-zero exit status 75.
Mar 05 21:30:31.120054 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Mar 05 21:30:31.131235 osdx sshd[678929]: Server listening on 0.0.0.0 port 22.
Mar 05 21:30:31.131263 osdx sshd[678929]: Server listening on :: port 22.
Mar 05 21:30:31.131349 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Mar 05 21:30:31.133375 osdx cfgd[1620]: [632527]Completed change to active configuration
Mar 05 21:30:31.145376 osdx OSDxCLI[632527]: User 'admin' committed the configuration.
Mar 05 21:30:31.173946 osdx OSDxCLI[632527]: User 'admin' left the configuration menu.
Mar 05 21:30:31.315541 osdx OSDxCLI[632527]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Mar 05 21:30:33.057570 osdx OSDxCLI[632527]: User 'admin' entered the configuration menu.
Mar 05 21:30:33.113086 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Mar 05 21:30:33.208621 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Mar 05 21:30:33.258303 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Mar 05 21:30:33.363733 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Mar 05 21:30:33.422802 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Mar 05 21:30:33.510124 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Mar 05 21:30:33.584741 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash df0a49f6bedabb7c193590b2fe55da4b7e97416d545b003fa11c808af2d5ed21'.
Mar 05 21:30:33.668498 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Mar 05 21:30:33.723801 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Mar 05 21:30:33.828298 osdx OSDxCLI[632527]: User 'admin' added a new cfg line: 'show working'.
Mar 05 21:30:33.900059 osdx ubnt-cfgd[678978]: inactive
Mar 05 21:30:33.926517 osdx INFO[678986]: FRR daemons did not change
Mar 05 21:30:33.941892 osdx ca-certificates[679001]: Updating certificates in /etc/ssl/certs...
Mar 05 21:30:34.473782 osdx ubnt-cfgd[680014]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Mar 05 21:30:34.481212 osdx ca-certificates[680020]: 1 added, 0 removed; done.
Mar 05 21:30:34.484072 osdx ca-certificates[680026]: Running hooks in /etc/ca-certificates/update.d...
Mar 05 21:30:34.486796 osdx ca-certificates[680028]: done.
Mar 05 21:30:34.604110 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Mar 05 21:30:34.606093 osdx cfgd[1620]: [632527]Completed change to active configuration
Mar 05 21:30:34.609275 osdx OSDxCLI[632527]: User 'admin' committed the configuration.
Mar 05 21:30:34.638158 osdx OSDxCLI[632527]: User 'admin' left the configuration menu.
Mar 05 21:30:34.715749 osdx dnscrypt-proxy[680087]: dnscrypt-proxy 2.0.45
Mar 05 21:30:34.715824 osdx dnscrypt-proxy[680087]: Network connectivity detected
Mar 05 21:30:34.718597 osdx dnscrypt-proxy[680087]: Dropping privileges
Mar 05 21:30:34.720535 osdx dnscrypt-proxy[680087]: Network connectivity detected
Mar 05 21:30:34.720566 osdx dnscrypt-proxy[680087]: Now listening to 127.0.0.1:53 [UDP]
Mar 05 21:30:34.720570 osdx dnscrypt-proxy[680087]: Now listening to 127.0.0.1:53 [TCP]
Mar 05 21:30:34.720587 osdx dnscrypt-proxy[680087]: Firefox workaround initialized
Mar 05 21:30:34.720591 osdx dnscrypt-proxy[680087]: Loading the set of cloaking rules from [/tmp/tmp6wmoaj51]
Mar 05 21:30:34.806763 osdx OSDxCLI[632527]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Mar 05 21:30:34.877678 osdx dnscrypt-proxy[680087]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Mar 05 21:30:34.877696 osdx dnscrypt-proxy[680087]: [DUT0] OK (DoH) - rtt: 76ms
Mar 05 21:30:34.877810 osdx dnscrypt-proxy[680087]: Server with the lowest initial latency: DUT0 (rtt: 76ms)
Mar 05 21:30:34.877816 osdx dnscrypt-proxy[680087]: dnscrypt-proxy is ready - live servers: 1
Mar 05 21:30:34.913925 osdx OSDxCLI[632527]: User 'admin' executed a new command: 'show host lookup teldat.com type A'.