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 ff80e2d024d82777d02b37c8a1ed89520186169f14f43384f0622363e9f2d2a7
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 ed0c66c195c800a61a00b061037ece13e6c8cb417ea20ee7e6740cd6b0e408fb
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.229 ms

--- 10.215.168.64 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.229/0.229/0.229/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
Feb 12 17:43:57.374186 osdx systemd-journald[1751]: Runtime Journal (/run/log/journal/4b9b84bfb27047f880a6339fcfe21077) is 912.0K, max 6.5M, 5.6M free.
Feb 12 17:43:57.379746 osdx systemd-journald[1751]: Received client request to rotate journal, rotating.
Feb 12 17:43:57.379829 osdx systemd-journald[1751]: Vacuuming done, freed 0B of archived journals from /run/log/journal/4b9b84bfb27047f880a6339fcfe21077.
Feb 12 17:43:57.388102 osdx OSDxCLI[37265]: User 'admin' executed a new command: 'system journal clear'.
Feb 12 17:43:57.613366 osdx OSDxCLI[37265]: User 'admin' executed a new command: 'system coredump delete all'.
Feb 12 17:43:58.892365 osdx OSDxCLI[37265]: User 'admin' entered the configuration menu.
Feb 12 17:43:59.039750 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Feb 12 17:43:59.108062 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Feb 12 17:43:59.220659 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set service ssh'.
Feb 12 17:43:59.322315 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'show working'.
Feb 12 17:43:59.434611 osdx ubnt-cfgd[73789]: inactive
Feb 12 17:43:59.538342 osdx INFO[73810]: FRR daemons did not change
Feb 12 17:43:59.572725 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Feb 12 17:43:59.625282 osdx WARNING[73879]: No supported link modes on interface eth0
Feb 12 17:43:59.626680 osdx modulelauncher[73879]: osdx.utils.xos cmd error: /sbin/ethtool -A eth0 autoneg on
Feb 12 17:43:59.626692 osdx modulelauncher[73879]: Command '/sbin/ethtool -A eth0 autoneg on' returned non-zero exit status 76.
Feb 12 17:43:59.627928 osdx modulelauncher[73879]: osdx.utils.xos cmd error: /sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off --
Feb 12 17:43:59.627940 osdx modulelauncher[73879]: Command '/sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off --' returned non-zero exit status 75.
Feb 12 17:43:59.721516 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Feb 12 17:43:59.737535 osdx sshd[73945]: Server listening on 0.0.0.0 port 22.
Feb 12 17:43:59.737568 osdx sshd[73945]: Server listening on :: port 22.
Feb 12 17:43:59.737700 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Feb 12 17:43:59.738655 osdx cfgd[1426]: [37265]Completed change to active configuration
Feb 12 17:43:59.751115 osdx OSDxCLI[37265]: User 'admin' committed the configuration.
Feb 12 17:43:59.784349 osdx OSDxCLI[37265]: User 'admin' left the configuration menu.
Feb 12 17:43:59.994576 osdx OSDxCLI[37265]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Feb 12 17:44:02.312573 osdx OSDxCLI[37265]: User 'admin' entered the configuration menu.
Feb 12 17:44:02.457224 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Feb 12 17:44:02.612933 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Feb 12 17:44:02.745834 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Feb 12 17:44:02.860144 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Feb 12 17:44:02.937998 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Feb 12 17:44:03.082310 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Feb 12 17:44:03.153213 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash ed0c66c195c800a61a00b061037ece13e6c8cb417ea20ee7e6740cd6b0e408fb'.
Feb 12 17:44:03.244166 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Feb 12 17:44:03.301420 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Feb 12 17:44:03.424621 osdx OSDxCLI[37265]: User 'admin' added a new cfg line: 'show working'.
Feb 12 17:44:03.554712 osdx ubnt-cfgd[73997]: inactive
Feb 12 17:44:03.577639 osdx INFO[74005]: FRR daemons did not change
Feb 12 17:44:03.610695 osdx ca-certificates[74021]: Updating certificates in /etc/ssl/certs...
Feb 12 17:44:04.261784 osdx ubnt-cfgd[75033]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Feb 12 17:44:04.275694 osdx ca-certificates[75037]: 1 added, 0 removed; done.
Feb 12 17:44:04.279634 osdx ca-certificates[75045]: Running hooks in /etc/ca-certificates/update.d...
Feb 12 17:44:04.283943 osdx ca-certificates[75047]: done.
Feb 12 17:44:04.421162 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Feb 12 17:44:04.423300 osdx cfgd[1426]: [37265]Completed change to active configuration
Feb 12 17:44:04.426977 osdx OSDxCLI[37265]: User 'admin' committed the configuration.
Feb 12 17:44:04.454433 osdx OSDxCLI[37265]: User 'admin' left the configuration menu.
Feb 12 17:44:04.639104 osdx dnscrypt-proxy[75106]: dnscrypt-proxy 2.0.45
Feb 12 17:44:04.639175 osdx dnscrypt-proxy[75106]: Network connectivity detected
Feb 12 17:44:04.639416 osdx dnscrypt-proxy[75106]: Dropping privileges
Feb 12 17:44:04.643562 osdx dnscrypt-proxy[75106]: Network connectivity detected
Feb 12 17:44:04.643867 osdx dnscrypt-proxy[75106]: Now listening to 127.0.0.1:53 [UDP]
Feb 12 17:44:04.643929 osdx dnscrypt-proxy[75106]: Now listening to 127.0.0.1:53 [TCP]
Feb 12 17:44:04.644001 osdx dnscrypt-proxy[75106]: Firefox workaround initialized
Feb 12 17:44:04.644050 osdx dnscrypt-proxy[75106]: Loading the set of cloaking rules from [/tmp/tmpsor8hata]
Feb 12 17:44:04.657505 osdx OSDxCLI[37265]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Feb 12 17:44:04.752551 osdx dnscrypt-proxy[75106]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Feb 12 17:44:04.752568 osdx dnscrypt-proxy[75106]: [DUT0] OK (DoH) - rtt: 54ms
Feb 12 17:44:04.752576 osdx dnscrypt-proxy[75106]: Server with the lowest initial latency: DUT0 (rtt: 54ms)
Feb 12 17:44:04.752580 osdx dnscrypt-proxy[75106]: dnscrypt-proxy is ready - live servers: 1
Feb 12 17:44:04.819741 osdx OSDxCLI[37265]: User 'admin' executed a new command: 'show host lookup teldat.com type A'.