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 2bf8e614357d7ffe91a319d2d25e8046a64f2d349a757e66b5e8c8ccea2231f5 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 f22a5f65ee47bfe957bb7fdb2e03dc858dea511ac051273c84a57731be1429c0 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
May 14 09:50:04.310554 osdx systemd-journald[1753]: Runtime Journal (/run/log/journal/899392cd00944cdaa29aa3964bffbd0e) is 992.0K, max 7.2M, 6.2M free. May 14 09:50:04.312918 osdx systemd-journald[1753]: Received client request to rotate journal, rotating. May 14 09:50:04.312983 osdx systemd-journald[1753]: Vacuuming done, freed 0B of archived journals from /run/log/journal/899392cd00944cdaa29aa3964bffbd0e. May 14 09:50:04.320403 osdx OSDxCLI[154664]: User 'admin' executed a new command: 'system journal clear'. May 14 09:50:04.788939 osdx osdx-coredump[217789]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... May 14 09:50:04.796883 osdx OSDxCLI[154664]: User 'admin' executed a new command: 'system coredump delete all'. May 14 09:50:05.920754 osdx OSDxCLI[154664]: User 'admin' entered the configuration menu. May 14 09:50:06.001500 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'. May 14 09:50:06.089526 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. May 14 09:50:06.146203 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set service ssh'. May 14 09:50:06.257377 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'show working'. May 14 09:50:06.344137 osdx ubnt-cfgd[217808]: inactive May 14 09:50:06.373264 osdx INFO[217822]: FRR daemons did not change May 14 09:50:06.392945 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 May 14 09:50:06.561204 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... May 14 09:50:06.573701 osdx sshd[217936]: Server listening on 0.0.0.0 port 22. May 14 09:50:06.573958 osdx sshd[217936]: Server listening on :: port 22. May 14 09:50:06.574091 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server. May 14 09:50:06.598204 osdx cfgd[1455]: [154664]Completed change to active configuration May 14 09:50:06.609993 osdx OSDxCLI[154664]: User 'admin' committed the configuration. May 14 09:50:06.628313 osdx OSDxCLI[154664]: User 'admin' left the configuration menu. May 14 09:50:06.791714 osdx OSDxCLI[154664]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. May 14 09:50:08.612345 osdx OSDxCLI[154664]: User 'admin' entered the configuration menu. May 14 09:50:08.698797 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'. May 14 09:50:08.797199 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'. May 14 09:50:08.880706 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'. May 14 09:50:09.007323 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'. May 14 09:50:09.092592 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'. May 14 09:50:09.158477 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'. May 14 09:50:09.269627 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash f22a5f65ee47bfe957bb7fdb2e03dc858dea511ac051273c84a57731be1429c0'. May 14 09:50:09.344345 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'. May 14 09:50:09.453294 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'set service dns resolver local'. May 14 09:50:09.577529 osdx OSDxCLI[154664]: User 'admin' added a new cfg line: 'show working'. May 14 09:50:09.686412 osdx ubnt-cfgd[217993]: inactive May 14 09:50:09.706201 osdx INFO[218001]: FRR daemons did not change May 14 09:50:09.718180 osdx ca-certificates[218017]: Updating certificates in /etc/ssl/certs... May 14 09:50:10.211099 osdx ca-certificates[219021]: 1 added, 0 removed; done. May 14 09:50:10.214820 osdx ca-certificates[219027]: Running hooks in /etc/ca-certificates/update.d... May 14 09:50:10.218293 osdx ca-certificates[219029]: done. May 14 09:50:10.321281 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy. May 14 09:50:10.322974 osdx cfgd[1455]: [154664]Completed change to active configuration May 14 09:50:10.328257 osdx OSDxCLI[154664]: User 'admin' committed the configuration. May 14 09:50:10.352069 osdx OSDxCLI[154664]: User 'admin' left the configuration menu. May 14 09:50:10.366563 osdx dnscrypt-proxy[219089]: dnscrypt-proxy 2.0.45 May 14 09:50:10.366620 osdx dnscrypt-proxy[219089]: Network connectivity detected May 14 09:50:10.366795 osdx dnscrypt-proxy[219089]: Dropping privileges May 14 09:50:10.368675 osdx dnscrypt-proxy[219089]: Network connectivity detected May 14 09:50:10.368703 osdx dnscrypt-proxy[219089]: Now listening to 127.0.0.1:53 [UDP] May 14 09:50:10.368707 osdx dnscrypt-proxy[219089]: Now listening to 127.0.0.1:53 [TCP] May 14 09:50:10.368729 osdx dnscrypt-proxy[219089]: Firefox workaround initialized May 14 09:50:10.368733 osdx dnscrypt-proxy[219089]: Loading the set of cloaking rules from [/tmp/tmpu_ve32ej] May 14 09:50:10.517116 osdx OSDxCLI[154664]: User 'admin' executed a new command: 'system journal show | cat'. May 14 09:50:12.381738 osdx dnscrypt-proxy[219089]: Unable to resolve [dns.dut0] using fallback resolver udp[9.9.9.9:53]: read udp 10.215.168.65:45256->9.9.9.9:53: i/o timeout May 14 09:50:12.381746 osdx dnscrypt-proxy[219089]: System DNS configuration not usable yet, exceptionally resolving [dns.dut0] using fallback resolvers over tcp May 14 09:50:12.633953 osdx OSDxCLI[154664]: User 'admin' executed a new command: 'system journal show | cat'. May 14 09:50:14.749475 osdx dnscrypt-proxy[219089]: Unable to resolve [dns.dut0] using fallback resolver udp[9.9.9.9:53]: read udp 10.215.168.65:53689->9.9.9.9:53: i/o timeout May 14 09:50:14.749485 osdx dnscrypt-proxy[219089]: System DNS configuration not usable yet, exceptionally resolving [dns.dut0] using fallback resolvers over tcp May 14 09:50:14.751025 osdx OSDxCLI[154664]: User 'admin' executed a new command: 'system journal show | cat'. May 14 09:50:14.929301 osdx dnscrypt-proxy[219089]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867 May 14 09:50:14.929313 osdx dnscrypt-proxy[219089]: [DUT0] OK (DoH) - rtt: 120ms May 14 09:50:14.929321 osdx dnscrypt-proxy[219089]: Server with the lowest initial latency: DUT0 (rtt: 120ms) May 14 09:50:14.929325 osdx dnscrypt-proxy[219089]: dnscrypt-proxy is ready - live servers: 1