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 56f84956a81b8326accde7f3159265ae8dee5f1377cc2cbee7baf4ff8b8c82c6 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 9240348dfd4d3e16cdc5ff26e4011ca6ea760c7464f2b4cae25d5372a94348a8 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
Apr 10 20:10:42.303756 osdx systemd-journald[1764]: Runtime Journal (/run/log/journal/05ba5a9ee053420dac2414195c972f49) is 1.0M, max 7.2M, 6.2M free. Apr 10 20:10:42.306088 osdx systemd-journald[1764]: Received client request to rotate journal, rotating. Apr 10 20:10:42.306168 osdx systemd-journald[1764]: Vacuuming done, freed 0B of archived journals from /run/log/journal/05ba5a9ee053420dac2414195c972f49. Apr 10 20:10:42.317631 osdx OSDxCLI[223617]: User 'admin' executed a new command: 'system journal clear'. Apr 10 20:10:42.796814 osdx osdx-coredump[290858]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... Apr 10 20:10:42.804953 osdx OSDxCLI[223617]: User 'admin' executed a new command: 'system coredump delete all'. Apr 10 20:10:43.980200 osdx OSDxCLI[223617]: User 'admin' entered the configuration menu. Apr 10 20:10:44.095139 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'. Apr 10 20:10:44.180709 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. Apr 10 20:10:44.285064 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set service ssh'. Apr 10 20:10:44.387520 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'show working'. Apr 10 20:10:44.469557 osdx ubnt-cfgd[290877]: inactive Apr 10 20:10:44.522511 osdx INFO[290891]: FRR daemons did not change Apr 10 20:10:44.542008 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 Apr 10 20:10:44.694275 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Apr 10 20:10:44.706567 osdx sshd[291005]: Server listening on 0.0.0.0 port 22. Apr 10 20:10:44.706801 osdx sshd[291005]: Server listening on :: port 22. Apr 10 20:10:44.706932 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server. Apr 10 20:10:44.728211 osdx cfgd[1456]: [223617]Completed change to active configuration Apr 10 20:10:44.740433 osdx OSDxCLI[223617]: User 'admin' committed the configuration. Apr 10 20:10:44.770177 osdx OSDxCLI[223617]: User 'admin' left the configuration menu. Apr 10 20:10:44.930657 osdx OSDxCLI[223617]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Apr 10 20:10:46.976785 osdx OSDxCLI[223617]: User 'admin' entered the configuration menu. Apr 10 20:10:47.067875 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'. Apr 10 20:10:47.156324 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'. Apr 10 20:10:47.222484 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'. Apr 10 20:10:47.342036 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'. Apr 10 20:10:47.400194 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'. Apr 10 20:10:47.506195 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'. Apr 10 20:10:47.572210 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 9240348dfd4d3e16cdc5ff26e4011ca6ea760c7464f2b4cae25d5372a94348a8'. Apr 10 20:10:47.678327 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'. Apr 10 20:10:47.737051 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'set service dns resolver local'. Apr 10 20:10:47.857036 osdx OSDxCLI[223617]: User 'admin' added a new cfg line: 'show working'. Apr 10 20:10:47.932943 osdx ubnt-cfgd[291063]: inactive Apr 10 20:10:48.030580 osdx INFO[291071]: FRR daemons did not change Apr 10 20:10:48.079783 osdx ca-certificates[291087]: Updating certificates in /etc/ssl/certs... Apr 10 20:10:48.696012 osdx ca-certificates[292089]: 1 added, 0 removed; done. Apr 10 20:10:48.698878 osdx ca-certificates[292097]: Running hooks in /etc/ca-certificates/update.d... Apr 10 20:10:48.701703 osdx ca-certificates[292099]: done. Apr 10 20:10:48.822417 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy. Apr 10 20:10:48.824258 osdx cfgd[1456]: [223617]Completed change to active configuration Apr 10 20:10:48.828360 osdx OSDxCLI[223617]: User 'admin' committed the configuration. Apr 10 20:10:48.845286 osdx OSDxCLI[223617]: User 'admin' left the configuration menu. Apr 10 20:10:49.022669 osdx OSDxCLI[223617]: User 'admin' executed a new command: 'system journal show | cat'. Apr 10 20:10:49.034945 osdx dnscrypt-proxy[292159]: dnscrypt-proxy 2.0.45 Apr 10 20:10:49.035007 osdx dnscrypt-proxy[292159]: Network connectivity detected Apr 10 20:10:49.035187 osdx dnscrypt-proxy[292159]: Dropping privileges Apr 10 20:10:49.037227 osdx dnscrypt-proxy[292159]: Network connectivity detected Apr 10 20:10:49.037258 osdx dnscrypt-proxy[292159]: Now listening to 127.0.0.1:53 [UDP] Apr 10 20:10:49.037262 osdx dnscrypt-proxy[292159]: Now listening to 127.0.0.1:53 [TCP] Apr 10 20:10:49.037280 osdx dnscrypt-proxy[292159]: Firefox workaround initialized Apr 10 20:10:49.037284 osdx dnscrypt-proxy[292159]: Loading the set of cloaking rules from [/tmp/tmpsxsj_p7u] Apr 10 20:10:49.310515 osdx dnscrypt-proxy[292159]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867 Apr 10 20:10:49.310528 osdx dnscrypt-proxy[292159]: [DUT0] OK (DoH) - rtt: 77ms Apr 10 20:10:49.310535 osdx dnscrypt-proxy[292159]: Server with the lowest initial latency: DUT0 (rtt: 77ms) Apr 10 20:10:49.310540 osdx dnscrypt-proxy[292159]: dnscrypt-proxy is ready - live servers: 1