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 81d8c57444e7a6865033e179e51a88281aac172403e7e688603f628babda0cbd
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 e63487280ccd3beb0ead085d75d42db3322ea1bdf79718ae8b194c4f4f1193b4
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
Jun 02 09:59:55.289629 osdx systemd-journald[1765]: Runtime Journal (/run/log/journal/27bca15c163b4997962c56740a934d39) is 960.0K, max 6.5M, 5.5M free.
Jun 02 09:59:55.292007 osdx systemd-journald[1765]: Received client request to rotate journal, rotating.
Jun 02 09:59:55.292080 osdx systemd-journald[1765]: Vacuuming done, freed 0B of archived journals from /run/log/journal/27bca15c163b4997962c56740a934d39.
Jun 02 09:59:55.302249 osdx OSDxCLI[68402]: User 'admin' executed a new command: 'system journal clear'.
Jun 02 09:59:55.518491 osdx OSDxCLI[68402]: User 'admin' executed a new command: 'system coredump delete all'.
Jun 02 09:59:56.508785 osdx OSDxCLI[68402]: User 'admin' entered the configuration menu.
Jun 02 09:59:56.617483 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Jun 02 09:59:56.704830 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Jun 02 09:59:56.820456 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set service ssh'.
Jun 02 09:59:56.940820 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'show working'.
Jun 02 09:59:57.007860 osdx ubnt-cfgd[176251]: inactive
Jun 02 09:59:57.034974 osdx INFO[176265]: FRR daemons did not change
Jun 02 09:59:57.064001 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Jun 02 09:59:57.200311 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Jun 02 09:59:57.214789 osdx sshd[176381]: Server listening on 0.0.0.0 port 22.
Jun 02 09:59:57.215078 osdx sshd[176381]: Server listening on :: port 22.
Jun 02 09:59:57.215229 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Jun 02 09:59:57.239616 osdx cfgd[1460]: [68402]Completed change to active configuration
Jun 02 09:59:57.251718 osdx OSDxCLI[68402]: User 'admin' committed the configuration.
Jun 02 09:59:57.272973 osdx OSDxCLI[68402]: User 'admin' left the configuration menu.
Jun 02 09:59:57.428326 osdx OSDxCLI[68402]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Jun 02 09:59:59.279740 osdx OSDxCLI[68402]: User 'admin' entered the configuration menu.
Jun 02 09:59:59.350194 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Jun 02 09:59:59.451447 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Jun 02 09:59:59.505966 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Jun 02 09:59:59.633332 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Jun 02 09:59:59.698862 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Jun 02 09:59:59.814835 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Jun 02 09:59:59.879235 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash e63487280ccd3beb0ead085d75d42db3322ea1bdf79718ae8b194c4f4f1193b4'.
Jun 02 09:59:59.973206 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Jun 02 10:00:00.068355 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Jun 02 10:00:00.141374 osdx OSDxCLI[68402]: User 'admin' added a new cfg line: 'show working'.
Jun 02 10:00:00.236764 osdx ubnt-cfgd[176438]: inactive
Jun 02 10:00:00.256801 osdx INFO[176446]: FRR daemons did not change
Jun 02 10:00:00.270092 osdx ca-certificates[176462]: Updating certificates in /etc/ssl/certs...
Jun 02 10:00:00.783436 osdx ubnt-cfgd[177460]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Jun 02 10:00:00.790724 osdx ca-certificates[177465]: 1 added, 0 removed; done.
Jun 02 10:00:00.793953 osdx ca-certificates[177472]: Running hooks in /etc/ca-certificates/update.d...
Jun 02 10:00:00.796806 osdx ca-certificates[177474]: done.
Jun 02 10:00:00.948476 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Jun 02 10:00:00.950084 osdx cfgd[1460]: [68402]Completed change to active configuration
Jun 02 10:00:00.953394 osdx OSDxCLI[68402]: User 'admin' committed the configuration.
Jun 02 10:00:00.969816 osdx OSDxCLI[68402]: User 'admin' left the configuration menu.
Jun 02 10:00:00.982421 osdx dnscrypt-proxy[177534]: dnscrypt-proxy 2.0.45
Jun 02 10:00:00.982761 osdx dnscrypt-proxy[177534]: Network connectivity detected
Jun 02 10:00:00.983063 osdx dnscrypt-proxy[177534]: Dropping privileges
Jun 02 10:00:00.985733 osdx dnscrypt-proxy[177534]: Network connectivity detected
Jun 02 10:00:00.985773 osdx dnscrypt-proxy[177534]: Now listening to 127.0.0.1:53 [UDP]
Jun 02 10:00:00.985778 osdx dnscrypt-proxy[177534]: Now listening to 127.0.0.1:53 [TCP]
Jun 02 10:00:00.985805 osdx dnscrypt-proxy[177534]: Firefox workaround initialized
Jun 02 10:00:00.985810 osdx dnscrypt-proxy[177534]: Loading the set of cloaking rules from [/tmp/tmp69nw7hgc]
Jun 02 10:00:01.137889 osdx OSDxCLI[68402]: User 'admin' executed a new command: 'system journal show | cat'.
Jun 02 10:00:01.226829 osdx dnscrypt-proxy[177534]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Jun 02 10:00:01.226843 osdx dnscrypt-proxy[177534]: [DUT0] OK (DoH) - rtt: 128ms
Jun 02 10:00:01.226852 osdx dnscrypt-proxy[177534]: Server with the lowest initial latency: DUT0 (rtt: 128ms)
Jun 02 10:00:01.226857 osdx dnscrypt-proxy[177534]: dnscrypt-proxy is ready - live servers: 1