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 654360ee51829bf4a8cea9c41e387b649d8a86841ca20ec804f6d7b17eea4854
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 2a5f5dd9703505f6183b8afe8b8e02c823fefb629473bce6ceda2e29305c794f
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
Jul 30 12:16:39.252869 osdx systemd-journald[1361]: Runtime Journal (/run/log/journal/022a18c941d64f479a590b363c3a1b1d) is 2.4M, max 9.7M, 7.3M free.
Jul 30 12:16:39.253978 osdx systemd-journald[1361]: Received client request to rotate journal, rotating.
Jul 30 12:16:39.254017 osdx systemd-journald[1361]: Vacuuming done, freed 0B of archived journals from /run/log/journal/022a18c941d64f479a590b363c3a1b1d.
Jul 30 12:16:39.262706 osdx OSDxCLI[96653]: User 'admin' executed a new command: 'system journal clear'.
Jul 30 12:16:39.651401 osdx osdx-coredump[148263]: Deleting all coredumps in /opt/vyatta/etc/config/coredump...
Jul 30 12:16:39.659405 osdx OSDxCLI[96653]: User 'admin' executed a new command: 'system coredump delete all'.
Jul 30 12:16:40.609050 osdx OSDxCLI[96653]: User 'admin' entered the configuration menu.
Jul 30 12:16:40.669667 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Jul 30 12:16:40.753761 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Jul 30 12:16:40.804421 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set service ssh'.
Jul 30 12:16:40.907361 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'show working'.
Jul 30 12:16:40.994093 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Jul 30 12:16:41.109998 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Jul 30 12:16:41.128207 osdx sshd[148351]: Server listening on 0.0.0.0 port 22.
Jul 30 12:16:41.128412 osdx sshd[148351]: Server listening on :: port 22.
Jul 30 12:16:41.128503 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Jul 30 12:16:41.150536 osdx cfgd[1029]: [96653]Completed change to active configuration
Jul 30 12:16:41.175553 osdx OSDxCLI[96653]: User 'admin' committed the configuration.
Jul 30 12:16:41.190238 osdx OSDxCLI[96653]: User 'admin' left the configuration menu.
Jul 30 12:16:41.321566 osdx OSDxCLI[96653]: User 'admin' executed a new command: 'ping 10.215.168.64      count 1 size 56 timeout 1'.
Jul 30 12:16:43.041478 osdx OSDxCLI[96653]: User 'admin' entered the configuration menu.
Jul 30 12:16:43.096664 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Jul 30 12:16:43.193132 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Jul 30 12:16:43.261961 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Jul 30 12:16:43.355062 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Jul 30 12:16:43.415540 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Jul 30 12:16:43.503997 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Jul 30 12:16:43.560626 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 2a5f5dd9703505f6183b8afe8b8e02c823fefb629473bce6ceda2e29305c794f'.
Jul 30 12:16:43.643141 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Jul 30 12:16:43.692932 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Jul 30 12:16:43.830612 osdx OSDxCLI[96653]: User 'admin' added a new cfg line: 'show working'.
Jul 30 12:16:43.967911 osdx ca-certificates[148425]: Updating certificates in /etc/ssl/certs...
Jul 30 12:16:44.505571 osdx ca-certificates[149427]: 1 added, 0 removed; done.
Jul 30 12:16:44.509288 osdx ca-certificates[149433]: Running hooks in /etc/ca-certificates/update.d...
Jul 30 12:16:44.512553 osdx ca-certificates[149437]: done.
Jul 30 12:16:44.617994 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Jul 30 12:16:44.620934 osdx cfgd[1029]: [96653]Completed change to active configuration
Jul 30 12:16:44.629122 osdx OSDxCLI[96653]: User 'admin' committed the configuration.
Jul 30 12:16:44.643940 osdx OSDxCLI[96653]: User 'admin' left the configuration menu.
Jul 30 12:16:44.844666 osdx OSDxCLI[96653]: User 'admin' executed a new command: 'system journal show | cat'.
Jul 30 12:16:44.932431 osdx dnscrypt-proxy[149497]: dnscrypt-proxy 2.0.45
Jul 30 12:16:44.932762 osdx dnscrypt-proxy[149497]: Network connectivity detected
Jul 30 12:16:44.932984 osdx dnscrypt-proxy[149497]: Dropping privileges
Jul 30 12:16:44.935031 osdx dnscrypt-proxy[149497]: Network connectivity detected
Jul 30 12:16:44.935222 osdx dnscrypt-proxy[149497]: Now listening to 127.0.0.1:53 [UDP]
Jul 30 12:16:44.935271 osdx dnscrypt-proxy[149497]: Now listening to 127.0.0.1:53 [TCP]
Jul 30 12:16:44.935318 osdx dnscrypt-proxy[149497]: Firefox workaround initialized
Jul 30 12:16:44.935359 osdx dnscrypt-proxy[149497]: Loading the set of cloaking rules from [/tmp/tmp4fzdgh89]
Jul 30 12:16:45.029153 osdx OSDxCLI[96653]: User 'admin' executed a new command: 'system journal show | cat'.
Jul 30 12:16:45.211936 osdx OSDxCLI[96653]: User 'admin' executed a new command: 'system journal show | cat'.
Jul 30 12:16:45.392940 osdx OSDxCLI[96653]: User 'admin' executed a new command: 'system journal show | cat'.
Jul 30 12:16:45.592433 osdx OSDxCLI[96653]: User 'admin' executed a new command: 'system journal show | cat'.
Jul 30 12:16:45.751699 osdx dnscrypt-proxy[149497]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Jul 30 12:16:45.751710 osdx dnscrypt-proxy[149497]: [DUT0] OK (DoH) - rtt: 130ms
Jul 30 12:16:45.751717 osdx dnscrypt-proxy[149497]: Server with the lowest initial latency: DUT0 (rtt: 130ms)
Jul 30 12:16:45.751720 osdx dnscrypt-proxy[149497]: dnscrypt-proxy is ready - live servers: 1