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 7a29a0b37ebaaede8a38645ac1ef0ebcf68cb59eec2cc37db7bb962a1ff5c77b 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 735746e895da79823c103b9bac5fc3359851a3d46097680552560bbceffd8d14 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: Ping IP address 10.215.168.64 from DUT1:
admin@DUT1$ ping 10.215.168.64 count 1 size 56 timeout 1Show output
PING 10.215.168.64 (10.215.168.64) 56(84) bytes of data. 64 bytes from 10.215.168.64: icmp_seq=1 ttl=64 time=0.540 ms --- 10.215.168.64 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.540/0.540/0.540/0.000 ms
Step 4: Run command show host lookup teldat.com type A at DUT1 and check if output contains the following tokens:
teldat.com has address 10.11.12.13Show output
;; communications error to ::1#53: connection refused ;; communications error to ::1#53: connection refused teldat.com has address 10.11.12.13
Step 5: Run command system journal show | cat at DUT1 and expect this output:
Show output
Jun 04 19:44:04.277619 osdx systemd-journald[1992]: Runtime Journal (/run/log/journal/8ce304953175416aa09f22e2dd03a8cc) is 956.0K, max 6.4M, 5.5M free. Jun 04 19:44:04.279727 osdx systemd-journald[1992]: Received client request to rotate journal, rotating. Jun 04 19:44:04.279785 osdx systemd-journald[1992]: Vacuuming done, freed 0B of archived journals from /run/log/journal/8ce304953175416aa09f22e2dd03a8cc. Jun 04 19:44:04.287080 osdx OSDxCLI[675110]: User 'admin' executed a new command: 'system journal clear'. Jun 04 19:44:04.525479 osdx OSDxCLI[675110]: User 'admin' executed a new command: 'system coredump delete all'. Jun 04 19:44:05.745681 osdx OSDxCLI[675110]: User 'admin' entered the configuration menu. Jun 04 19:44:05.841525 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'. Jun 04 19:44:05.896997 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. Jun 04 19:44:05.994354 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set service ssh'. Jun 04 19:44:06.054768 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'show working'. Jun 04 19:44:06.146612 osdx ubnt-cfgd[736632]: inactive Jun 04 19:44:06.225087 osdx INFO[736653]: FRR daemons did not change Jun 04 19:44:06.255708 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 Jun 04 19:44:06.309859 osdx WARNING[736722]: No supported link modes on interface eth0 Jun 04 19:44:06.311466 osdx modulelauncher[736722]: osdx.utils.xos cmd error: /sbin/ethtool -A eth0 autoneg on Jun 04 19:44:06.311478 osdx modulelauncher[736722]: Command '/sbin/ethtool -A eth0 autoneg on' returned non-zero exit status 76. Jun 04 19:44:06.312965 osdx modulelauncher[736722]: osdx.utils.xos cmd error: /sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off -- Jun 04 19:44:06.312974 osdx modulelauncher[736722]: Command '/sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off --' returned non-zero exit status 75. Jun 04 19:44:06.428027 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Jun 04 19:44:06.440744 osdx sshd[736788]: Server listening on 0.0.0.0 port 22. Jun 04 19:44:06.440774 osdx sshd[736788]: Server listening on :: port 22. Jun 04 19:44:06.440893 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server. Jun 04 19:44:06.441909 osdx cfgd[1711]: [675110]Completed change to active configuration Jun 04 19:44:06.454504 osdx OSDxCLI[675110]: User 'admin' committed the configuration. Jun 04 19:44:06.474133 osdx OSDxCLI[675110]: User 'admin' left the configuration menu. Jun 04 19:44:06.618493 osdx OSDxCLI[675110]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Jun 04 19:44:08.526367 osdx OSDxCLI[675110]: User 'admin' entered the configuration menu. Jun 04 19:44:08.638698 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'. Jun 04 19:44:08.758907 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'. Jun 04 19:44:08.826638 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'. Jun 04 19:44:08.926381 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'. Jun 04 19:44:08.986288 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'. Jun 04 19:44:09.085584 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'. Jun 04 19:44:09.158679 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 735746e895da79823c103b9bac5fc3359851a3d46097680552560bbceffd8d14'. Jun 04 19:44:09.275701 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'. Jun 04 19:44:09.383222 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'set service dns resolver local'. Jun 04 19:44:09.457819 osdx OSDxCLI[675110]: User 'admin' added a new cfg line: 'show working'. Jun 04 19:44:09.561516 osdx ubnt-cfgd[736838]: inactive Jun 04 19:44:09.585336 osdx INFO[736846]: FRR daemons did not change Jun 04 19:44:09.600613 osdx ca-certificates[736862]: Updating certificates in /etc/ssl/certs... Jun 04 19:44:10.148293 osdx ubnt-cfgd[737874]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL Jun 04 19:44:10.156690 osdx ca-certificates[737880]: 1 added, 0 removed; done. Jun 04 19:44:10.159752 osdx ca-certificates[737886]: Running hooks in /etc/ca-certificates/update.d... Jun 04 19:44:10.163388 osdx ca-certificates[737888]: done. Jun 04 19:44:10.292413 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy. Jun 04 19:44:10.295788 osdx cfgd[1711]: [675110]Completed change to active configuration Jun 04 19:44:10.304247 osdx OSDxCLI[675110]: User 'admin' committed the configuration. Jun 04 19:44:10.315208 osdx dnscrypt-proxy[737947]: dnscrypt-proxy 2.0.45 Jun 04 19:44:10.315269 osdx dnscrypt-proxy[737947]: Network connectivity detected Jun 04 19:44:10.315460 osdx dnscrypt-proxy[737947]: Dropping privileges Jun 04 19:44:10.317448 osdx dnscrypt-proxy[737947]: Network connectivity detected Jun 04 19:44:10.317476 osdx dnscrypt-proxy[737947]: Now listening to 127.0.0.1:53 [UDP] Jun 04 19:44:10.317480 osdx dnscrypt-proxy[737947]: Now listening to 127.0.0.1:53 [TCP] Jun 04 19:44:10.317495 osdx dnscrypt-proxy[737947]: Firefox workaround initialized Jun 04 19:44:10.317499 osdx dnscrypt-proxy[737947]: Loading the set of cloaking rules from [/tmp/tmpefkhwfp9] Jun 04 19:44:10.337754 osdx OSDxCLI[675110]: User 'admin' left the configuration menu. Jun 04 19:44:10.513344 osdx OSDxCLI[675110]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Jun 04 19:44:10.526682 osdx dnscrypt-proxy[737947]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867 Jun 04 19:44:10.526700 osdx dnscrypt-proxy[737947]: [DUT0] OK (DoH) - rtt: 120ms Jun 04 19:44:10.526710 osdx dnscrypt-proxy[737947]: Server with the lowest initial latency: DUT0 (rtt: 120ms) Jun 04 19:44:10.526716 osdx dnscrypt-proxy[737947]: dnscrypt-proxy is ready - live servers: 1 Jun 04 19:44:10.633279 osdx OSDxCLI[675110]: User 'admin' executed a new command: 'show host lookup teldat.com type A'.