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 20cbb339f943b7564dfff33f0d2ef3d34de1e142130cc6df36ef782f2bd85194 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 fce50ecbaca7292d76c6a57c9d2387f5f15ea64faa5c45fe860196d793982066 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
Dec 04 15:21:01.251230 osdx systemd-journald[1388]: Runtime Journal (/run/log/journal/e00a4863307c4ec795c6f3eeb7a5801b) is 1.2M, max 9.7M, 8.4M free. Dec 04 15:21:01.254733 osdx systemd-journald[1388]: Received client request to rotate journal, rotating. Dec 04 15:21:01.254785 osdx systemd-journald[1388]: Vacuuming done, freed 0B of archived journals from /run/log/journal/e00a4863307c4ec795c6f3eeb7a5801b. Dec 04 15:21:01.261560 osdx OSDxCLI[1605]: User 'admin' executed a new command: 'system journal clear'. Dec 04 15:21:01.709404 osdx osdx-coredump[68173]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... Dec 04 15:21:01.716482 osdx OSDxCLI[1605]: User 'admin' executed a new command: 'system coredump delete all'. Dec 04 15:21:02.810063 osdx OSDxCLI[1605]: User 'admin' entered the configuration menu. Dec 04 15:21:02.909225 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'. Dec 04 15:21:02.964531 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. Dec 04 15:21:03.064073 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set service ssh'. Dec 04 15:21:03.135581 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'show working'. Dec 04 15:21:03.278747 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 Dec 04 15:21:03.443069 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Dec 04 15:21:03.468596 osdx sshd[68271]: Server listening on 0.0.0.0 port 22. Dec 04 15:21:03.468863 osdx sshd[68271]: Server listening on :: port 22. Dec 04 15:21:03.469008 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server. Dec 04 15:21:03.488579 osdx cfgd[1056]: [1605]Completed change to active configuration Dec 04 15:21:03.514232 osdx OSDxCLI[1605]: User 'admin' committed the configuration. Dec 04 15:21:03.529304 osdx OSDxCLI[1605]: User 'admin' left the configuration menu. Dec 04 15:21:03.688797 osdx OSDxCLI[1605]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Dec 04 15:21:05.612739 osdx OSDxCLI[1605]: User 'admin' entered the configuration menu. Dec 04 15:21:05.716387 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'. Dec 04 15:21:05.792103 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'. Dec 04 15:21:05.904367 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'. Dec 04 15:21:05.973222 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'. Dec 04 15:21:06.074622 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'. Dec 04 15:21:06.190641 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'. Dec 04 15:21:06.263709 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash fce50ecbaca7292d76c6a57c9d2387f5f15ea64faa5c45fe860196d793982066'. Dec 04 15:21:06.373277 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'. Dec 04 15:21:06.482687 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'set service dns resolver local'. Dec 04 15:21:06.613187 osdx OSDxCLI[1605]: User 'admin' added a new cfg line: 'show working'. Dec 04 15:21:06.711420 osdx ca-certificates[68345]: Updating certificates in /etc/ssl/certs... Dec 04 15:21:07.217439 osdx ca-certificates[69350]: 1 added, 0 removed; done. Dec 04 15:21:07.221162 osdx ca-certificates[69355]: Running hooks in /etc/ca-certificates/update.d... Dec 04 15:21:07.224306 osdx ca-certificates[69357]: done. Dec 04 15:21:07.347093 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy. Dec 04 15:21:07.348596 osdx cfgd[1056]: [1605]Completed change to active configuration Dec 04 15:21:07.351781 osdx OSDxCLI[1605]: User 'admin' committed the configuration. Dec 04 15:21:07.378168 osdx dnscrypt-proxy[69417]: dnscrypt-proxy 2.0.45 Dec 04 15:21:07.379969 osdx OSDxCLI[1605]: User 'admin' left the configuration menu. Dec 04 15:21:07.380428 osdx dnscrypt-proxy[69417]: Network connectivity detected Dec 04 15:21:07.380753 osdx dnscrypt-proxy[69417]: Dropping privileges Dec 04 15:21:07.383404 osdx dnscrypt-proxy[69417]: Network connectivity detected Dec 04 15:21:07.383431 osdx dnscrypt-proxy[69417]: Now listening to 127.0.0.1:53 [UDP] Dec 04 15:21:07.383436 osdx dnscrypt-proxy[69417]: Now listening to 127.0.0.1:53 [TCP] Dec 04 15:21:07.383455 osdx dnscrypt-proxy[69417]: Firefox workaround initialized Dec 04 15:21:07.383458 osdx dnscrypt-proxy[69417]: Loading the set of cloaking rules from [/tmp/tmp9l4x_iln] Dec 04 15:21:07.548489 osdx OSDxCLI[1605]: User 'admin' executed a new command: 'system journal show | cat'. Dec 04 15:21:07.691618 osdx dnscrypt-proxy[69417]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867 Dec 04 15:21:07.691636 osdx dnscrypt-proxy[69417]: [DUT0] OK (DoH) - rtt: 147ms Dec 04 15:21:07.691645 osdx dnscrypt-proxy[69417]: Server with the lowest initial latency: DUT0 (rtt: 147ms) Dec 04 15:21:07.691651 osdx dnscrypt-proxy[69417]: dnscrypt-proxy is ready - live servers: 1