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 3c15e90bd022a1619161d18b235841fbb951fd9251cbf16baaf9244baed3a840 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 26ad86f0e38ae4589c44feebf96dab055376ff3e4bc2bf5d7da85a865fb35d39 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
Feb 19 19:22:04.486674 osdx systemd-journald[1550]: Runtime Journal (/run/log/journal/ee06d3e1f21747438cc5b4c977b7f07b) is 992.0K, max 7.2M, 6.2M free. Feb 19 19:22:04.493382 osdx systemd-journald[1550]: Received client request to rotate journal, rotating. Feb 19 19:22:04.493496 osdx systemd-journald[1550]: Vacuuming done, freed 0B of archived journals from /run/log/journal/ee06d3e1f21747438cc5b4c977b7f07b. Feb 19 19:22:04.515524 osdx OSDxCLI[135601]: User 'admin' executed a new command: 'system journal clear'. Feb 19 19:22:05.465828 osdx osdx-coredump[187466]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... Feb 19 19:22:05.483277 osdx OSDxCLI[135601]: User 'admin' executed a new command: 'system coredump delete all'. Feb 19 19:22:07.867811 osdx OSDxCLI[135601]: User 'admin' entered the configuration menu. Feb 19 19:22:08.071811 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'. Feb 19 19:22:08.247306 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. Feb 19 19:22:08.395191 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set service ssh'. Feb 19 19:22:08.562151 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'show working'. Feb 19 19:22:08.817468 osdx INFO[187497]: FRR daemons did not change Feb 19 19:22:08.856232 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 Feb 19 19:22:09.267296 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Feb 19 19:22:09.303797 osdx sshd[187567]: Server listening on 0.0.0.0 port 22. Feb 19 19:22:09.304270 osdx sshd[187567]: Server listening on :: port 22. Feb 19 19:22:09.304554 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server. Feb 19 19:22:09.355983 osdx cfgd[1251]: [135601]Completed change to active configuration Feb 19 19:22:09.413909 osdx OSDxCLI[135601]: User 'admin' committed the configuration. Feb 19 19:22:09.463415 osdx OSDxCLI[135601]: User 'admin' left the configuration menu. Feb 19 19:22:09.734121 osdx OSDxCLI[135601]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Feb 19 19:22:14.017049 osdx OSDxCLI[135601]: User 'admin' entered the configuration menu. Feb 19 19:22:14.163498 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'. Feb 19 19:22:14.327882 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'. Feb 19 19:22:14.455987 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'. Feb 19 19:22:14.685989 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'. Feb 19 19:22:14.801160 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'. Feb 19 19:22:14.949021 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'. Feb 19 19:22:15.128066 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 26ad86f0e38ae4589c44feebf96dab055376ff3e4bc2bf5d7da85a865fb35d39'. Feb 19 19:22:15.232976 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'. Feb 19 19:22:15.366375 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'set service dns resolver local'. Feb 19 19:22:15.555084 osdx OSDxCLI[135601]: User 'admin' added a new cfg line: 'show working'. Feb 19 19:22:15.750655 osdx INFO[187630]: FRR daemons did not change Feb 19 19:22:15.772953 osdx ca-certificates[187645]: Updating certificates in /etc/ssl/certs... Feb 19 19:22:17.079430 osdx ca-certificates[188654]: 1 added, 0 removed; done. Feb 19 19:22:17.085970 osdx ca-certificates[188656]: Running hooks in /etc/ca-certificates/update.d... Feb 19 19:22:17.092850 osdx ca-certificates[188658]: done. Feb 19 19:22:17.341560 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy. Feb 19 19:22:17.348197 osdx cfgd[1251]: [135601]Completed change to active configuration Feb 19 19:22:17.358085 osdx OSDxCLI[135601]: User 'admin' committed the configuration. Feb 19 19:22:17.399630 osdx dnscrypt-proxy[188718]: dnscrypt-proxy 2.0.45 Feb 19 19:22:17.400121 osdx dnscrypt-proxy[188718]: Network connectivity detected Feb 19 19:22:17.400537 osdx dnscrypt-proxy[188718]: Dropping privileges Feb 19 19:22:17.419124 osdx dnscrypt-proxy[188718]: Network connectivity detected Feb 19 19:22:17.419490 osdx dnscrypt-proxy[188718]: Now listening to 127.0.0.1:53 [UDP] Feb 19 19:22:17.419581 osdx dnscrypt-proxy[188718]: Now listening to 127.0.0.1:53 [TCP] Feb 19 19:22:17.419700 osdx dnscrypt-proxy[188718]: Firefox workaround initialized Feb 19 19:22:17.419795 osdx dnscrypt-proxy[188718]: Loading the set of cloaking rules from [/tmp/tmpdkz03qit] Feb 19 19:22:17.429028 osdx OSDxCLI[135601]: User 'admin' left the configuration menu. Feb 19 19:22:17.625612 osdx dnscrypt-proxy[188718]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867 Feb 19 19:22:17.625633 osdx dnscrypt-proxy[188718]: [DUT0] OK (DoH) - rtt: 89ms Feb 19 19:22:17.625663 osdx dnscrypt-proxy[188718]: Server with the lowest initial latency: DUT0 (rtt: 89ms) Feb 19 19:22:17.625679 osdx dnscrypt-proxy[188718]: dnscrypt-proxy is ready - live servers: 1