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 99b11ac235cc5a678a924b00c9715f9d99120fb82ed6b147374fd0a314e61844 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 318f9eb053f649fbd42982ce65307431103512622efa7690f83e870cadb08023 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
Nov 12 16:25:19.358041 osdx systemd-journald[1754]: Runtime Journal (/run/log/journal/18feb8e5bb5a49edb7e456ab042ed98b) is 900.0K, max 6.5M, 5.6M free. Nov 12 16:25:19.358479 osdx systemd-journald[1754]: Received client request to rotate journal, rotating. Nov 12 16:25:19.358520 osdx systemd-journald[1754]: Vacuuming done, freed 0B of archived journals from /run/log/journal/18feb8e5bb5a49edb7e456ab042ed98b. Nov 12 16:25:19.367735 osdx OSDxCLI[229492]: User 'admin' executed a new command: 'system journal clear'. Nov 12 16:25:19.627772 osdx OSDxCLI[229492]: User 'admin' executed a new command: 'system coredump delete all'. Nov 12 16:25:20.757592 osdx OSDxCLI[229492]: User 'admin' entered the configuration menu. Nov 12 16:25:20.853394 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'. Nov 12 16:25:20.938317 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. Nov 12 16:25:21.048895 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set service ssh'. Nov 12 16:25:21.126229 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'show working'. Nov 12 16:25:21.256685 osdx ubnt-cfgd[345564]: inactive Nov 12 16:25:21.283832 osdx INFO[345576]: FRR daemons did not change Nov 12 16:25:21.310493 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 Nov 12 16:25:21.362016 osdx WARNING[345644]: No supported link modes on interface eth0 Nov 12 16:25:21.363373 osdx modulelauncher[345644]: osdx.utils.xos cmd error: /sbin/ethtool -A eth0 autoneg on Nov 12 16:25:21.363386 osdx modulelauncher[345644]: Command '/sbin/ethtool -A eth0 autoneg on' returned non-zero exit status 76. Nov 12 16:25:21.364903 osdx modulelauncher[345644]: osdx.utils.xos cmd error: /sbin/ethtool -s eth0 autoneg on advertise Asym_Pause off Pause off -- Nov 12 16:25:21.364950 osdx modulelauncher[345644]: Command '/sbin/ethtool -s eth0 autoneg on advertise Asym_Pause off Pause off --' returned non-zero exit status 75. Nov 12 16:25:21.474913 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Nov 12 16:25:21.487880 osdx sshd[345695]: Server listening on 0.0.0.0 port 22. Nov 12 16:25:21.487909 osdx sshd[345695]: Server listening on :: port 22. Nov 12 16:25:21.488017 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server. Nov 12 16:25:21.511588 osdx cfgd[1453]: [229492]Completed change to active configuration Nov 12 16:25:21.523856 osdx OSDxCLI[229492]: User 'admin' committed the configuration. Nov 12 16:25:21.540872 osdx OSDxCLI[229492]: User 'admin' left the configuration menu. Nov 12 16:25:21.697037 osdx OSDxCLI[229492]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Nov 12 16:25:23.772383 osdx OSDxCLI[229492]: User 'admin' entered the configuration menu. Nov 12 16:25:23.895924 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'. Nov 12 16:25:23.990466 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'. Nov 12 16:25:24.092877 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'. Nov 12 16:25:24.208436 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'. Nov 12 16:25:24.288474 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'. Nov 12 16:25:24.384319 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'. Nov 12 16:25:24.455901 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 318f9eb053f649fbd42982ce65307431103512622efa7690f83e870cadb08023'. Nov 12 16:25:24.548797 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'. Nov 12 16:25:24.652798 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'set service dns resolver local'. Nov 12 16:25:24.724819 osdx OSDxCLI[229492]: User 'admin' added a new cfg line: 'show working'. Nov 12 16:25:24.810329 osdx ubnt-cfgd[345752]: inactive Nov 12 16:25:24.830797 osdx INFO[345760]: FRR daemons did not change Nov 12 16:25:24.842720 osdx ca-certificates[345776]: Updating certificates in /etc/ssl/certs... Nov 12 16:25:25.396114 osdx ubnt-cfgd[346788]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL Nov 12 16:25:25.403153 osdx ca-certificates[346794]: 1 added, 0 removed; done. Nov 12 16:25:25.406280 osdx ca-certificates[346800]: Running hooks in /etc/ca-certificates/update.d... Nov 12 16:25:25.409165 osdx ca-certificates[346802]: done. Nov 12 16:25:25.518879 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy. Nov 12 16:25:25.520697 osdx cfgd[1453]: [229492]Completed change to active configuration Nov 12 16:25:25.526817 osdx OSDxCLI[229492]: User 'admin' committed the configuration. Nov 12 16:25:25.548876 osdx OSDxCLI[229492]: User 'admin' left the configuration menu. Nov 12 16:25:25.587809 osdx dnscrypt-proxy[346862]: dnscrypt-proxy 2.0.45 Nov 12 16:25:25.587862 osdx dnscrypt-proxy[346862]: Network connectivity detected Nov 12 16:25:25.588040 osdx dnscrypt-proxy[346862]: Dropping privileges Nov 12 16:25:25.590711 osdx dnscrypt-proxy[346862]: Network connectivity detected Nov 12 16:25:25.590747 osdx dnscrypt-proxy[346862]: Now listening to 127.0.0.1:53 [UDP] Nov 12 16:25:25.590753 osdx dnscrypt-proxy[346862]: Now listening to 127.0.0.1:53 [TCP] Nov 12 16:25:25.590771 osdx dnscrypt-proxy[346862]: Firefox workaround initialized Nov 12 16:25:25.590776 osdx dnscrypt-proxy[346862]: Loading the set of cloaking rules from [/tmp/tmpd6v798tw] Nov 12 16:25:25.709647 osdx OSDxCLI[229492]: User 'admin' executed a new command: 'system journal show | cat'. Nov 12 16:25:26.089089 osdx dnscrypt-proxy[346862]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867 Nov 12 16:25:26.089226 osdx dnscrypt-proxy[346862]: [DUT0] OK (DoH) - rtt: 118ms Nov 12 16:25:26.089235 osdx dnscrypt-proxy[346862]: Server with the lowest initial latency: DUT0 (rtt: 118ms) Nov 12 16:25:26.089239 osdx dnscrypt-proxy[346862]: dnscrypt-proxy is ready - live servers: 1