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 cadda5fb1405a6b43b17519900de566b425483c229c767ababeecce534770074 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 f75254c92472051052aaab260df4448bee1c04b6d25569c41e941423133b0443 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.377 ms --- 10.215.168.64 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.377/0.377/0.377/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
Jan 27 12:31:18.301634 osdx systemd-journald[1740]: Runtime Journal (/run/log/journal/37b75af121414321bf655c1ef6ebb727) is 956.0K, max 6.5M, 5.5M free. Jan 27 12:31:18.304615 osdx systemd-journald[1740]: Received client request to rotate journal, rotating. Jan 27 12:31:18.304672 osdx systemd-journald[1740]: Vacuuming done, freed 0B of archived journals from /run/log/journal/37b75af121414321bf655c1ef6ebb727. Jan 27 12:31:18.313533 osdx OSDxCLI[152046]: User 'admin' executed a new command: 'system journal clear'. Jan 27 12:31:18.512797 osdx OSDxCLI[152046]: User 'admin' executed a new command: 'system coredump delete all'. Jan 27 12:31:19.570941 osdx OSDxCLI[152046]: User 'admin' entered the configuration menu. Jan 27 12:31:19.694426 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'. Jan 27 12:31:19.963322 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. Jan 27 12:31:20.013814 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set service ssh'. Jan 27 12:31:20.117883 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'show working'. Jan 27 12:31:20.181887 osdx ubnt-cfgd[175236]: inactive Jan 27 12:31:20.268797 osdx INFO[175255]: FRR daemons did not change Jan 27 12:31:20.296615 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 Jan 27 12:31:20.344769 osdx WARNING[175324]: No supported link modes on interface eth0 Jan 27 12:31:20.346172 osdx modulelauncher[175324]: osdx.utils.xos cmd error: /sbin/ethtool -A eth0 autoneg on Jan 27 12:31:20.346185 osdx modulelauncher[175324]: Command '/sbin/ethtool -A eth0 autoneg on' returned non-zero exit status 76. Jan 27 12:31:20.347698 osdx modulelauncher[175324]: osdx.utils.xos cmd error: /sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off -- Jan 27 12:31:20.347709 osdx modulelauncher[175324]: Command '/sbin/ethtool -s eth0 autoneg on advertise Pause off Asym_Pause off --' returned non-zero exit status 75. Jan 27 12:31:20.440918 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Jan 27 12:31:20.453011 osdx sshd[175384]: Server listening on 0.0.0.0 port 22. Jan 27 12:31:20.453039 osdx sshd[175384]: Server listening on :: port 22. Jan 27 12:31:20.453131 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server. Jan 27 12:31:20.454523 osdx cfgd[1417]: [152046]Completed change to active configuration Jan 27 12:31:20.466041 osdx OSDxCLI[152046]: User 'admin' committed the configuration. Jan 27 12:31:20.484099 osdx OSDxCLI[152046]: User 'admin' left the configuration menu. Jan 27 12:31:20.619673 osdx OSDxCLI[152046]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Jan 27 12:31:22.539421 osdx OSDxCLI[152046]: User 'admin' entered the configuration menu. Jan 27 12:31:22.596435 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'. Jan 27 12:31:22.696290 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'. Jan 27 12:31:22.763390 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'. Jan 27 12:31:22.861738 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'. Jan 27 12:31:22.943218 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'. Jan 27 12:31:23.047122 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'. Jan 27 12:31:23.116420 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash f75254c92472051052aaab260df4448bee1c04b6d25569c41e941423133b0443'. Jan 27 12:31:23.212865 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'. Jan 27 12:31:23.271799 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'set service dns resolver local'. Jan 27 12:31:23.390000 osdx OSDxCLI[152046]: User 'admin' added a new cfg line: 'show working'. Jan 27 12:31:23.508519 osdx ubnt-cfgd[175433]: inactive Jan 27 12:31:23.530769 osdx INFO[175441]: FRR daemons did not change Jan 27 12:31:23.545658 osdx ca-certificates[175457]: Updating certificates in /etc/ssl/certs... Jan 27 12:31:24.076725 osdx ubnt-cfgd[176469]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL Jan 27 12:31:24.083576 osdx ca-certificates[176474]: 1 added, 0 removed; done. Jan 27 12:31:24.086496 osdx ca-certificates[176481]: Running hooks in /etc/ca-certificates/update.d... Jan 27 12:31:24.089197 osdx ca-certificates[176483]: done. Jan 27 12:31:24.208891 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy. Jan 27 12:31:24.210581 osdx cfgd[1417]: [152046]Completed change to active configuration Jan 27 12:31:24.214733 osdx OSDxCLI[152046]: User 'admin' committed the configuration. Jan 27 12:31:24.234510 osdx OSDxCLI[152046]: User 'admin' left the configuration menu. Jan 27 12:31:24.260357 osdx dnscrypt-proxy[176540]: dnscrypt-proxy 2.0.45 Jan 27 12:31:24.260412 osdx dnscrypt-proxy[176540]: Network connectivity detected Jan 27 12:31:24.260607 osdx dnscrypt-proxy[176540]: Dropping privileges Jan 27 12:31:24.263038 osdx dnscrypt-proxy[176540]: Network connectivity detected Jan 27 12:31:24.263218 osdx dnscrypt-proxy[176540]: Now listening to 127.0.0.1:53 [UDP] Jan 27 12:31:24.263252 osdx dnscrypt-proxy[176540]: Now listening to 127.0.0.1:53 [TCP] Jan 27 12:31:24.263298 osdx dnscrypt-proxy[176540]: Firefox workaround initialized Jan 27 12:31:24.263330 osdx dnscrypt-proxy[176540]: Loading the set of cloaking rules from [/tmp/tmp9ah553i9] Jan 27 12:31:24.384924 osdx OSDxCLI[152046]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Jan 27 12:31:29.385937 osdx dnscrypt-proxy[176540]: [DUT0] [https://dns.dut0:3000/dns-query]: Post "https://dns.dut0:3000/dns-query?body_hash=4afc8f0bde362deb0501fb727c606fc23deb14bf692f70743ac7cbf2e022bdc2": net/http: request canceled (Client.Timeout exceeded while awaiting headers) Jan 27 12:31:29.385951 osdx dnscrypt-proxy[176540]: Post "https://dns.dut0:3000/dns-query?body_hash=4afc8f0bde362deb0501fb727c606fc23deb14bf692f70743ac7cbf2e022bdc2": net/http: request canceled (Client.Timeout exceeded while awaiting headers) Jan 27 12:31:29.385956 osdx dnscrypt-proxy[176540]: dnscrypt-proxy is waiting for at least one server to be reachable Jan 27 12:31:29.469988 osdx OSDxCLI[152046]: User 'admin' entered an invalid command: 'show host lookup teldat.com type A'. Jan 27 12:31:39.673249 osdx dnscrypt-proxy[176540]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867 Jan 27 12:31:39.673269 osdx dnscrypt-proxy[176540]: [DUT0] OK (DoH) - rtt: 152ms Jan 27 12:31:39.673279 osdx dnscrypt-proxy[176540]: Server with the lowest initial latency: DUT0 (rtt: 152ms) Jan 27 12:31:44.565370 osdx OSDxCLI[152046]: User 'admin' entered an invalid command: 'show host lookup teldat.com type A'. Jan 27 12:31:48.036967 osdx systemd[1]: systemd-timedated.service: Deactivated successfully. Jan 27 12:31:54.664457 osdx OSDxCLI[152046]: User 'admin' executed a new command: 'show host lookup teldat.com type A'.