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 981fe98eb7a219769fd87dc4007c1189e24536fae0b43e352b1e9401008d0c2b 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 199100fbe8b7092a2a90b86838160a00cb240b273ccd975d9cf1fbbfd2470d79 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 the 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.244 ms --- 10.215.168.64 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.244/0.244/0.244/0.000 ms
Step 4: Run the command show host lookup teldat.com type A on DUT1 and check whether the 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 the command system journal show | cat on DUT1 and expect the following output:
Show output
Jun 03 18:13:20.289070 osdx systemd-journald[2044]: Runtime Journal (/run/log/journal/5f949ce1ec2e4c3196487af568d04dde) is 1000.0K, max 6.4M, 5.5M free. Jun 03 18:13:20.289624 osdx systemd-journald[2044]: Received client request to rotate journal, rotating. Jun 03 18:13:20.289669 osdx systemd-journald[2044]: Vacuuming done, freed 0B of archived journals from /run/log/journal/5f949ce1ec2e4c3196487af568d04dde. Jun 03 18:13:20.301155 osdx OSDxCLI[623229]: User 'admin' executed a new command: 'system journal clear'. Jun 03 18:13:20.559599 osdx OSDxCLI[623229]: User 'admin' executed a new command: 'system coredump delete all'. Jun 03 18:13:21.917403 osdx OSDxCLI[623229]: User 'admin' entered the configuration menu. Jun 03 18:13:22.054729 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'. Jun 03 18:13:22.139780 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. Jun 03 18:13:22.267339 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set service ssh'. Jun 03 18:13:22.358373 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'show working'. Jun 03 18:13:22.473413 osdx ubnt-cfgd[736207]: inactive Jun 03 18:13:22.574606 osdx INFO[736229]: FRR daemons did not change Jun 03 18:13:22.633880 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 Jun 03 18:13:22.702627 osdx WARNING[736300]: No supported link modes on interface eth0 Jun 03 18:13:22.705539 osdx modulelauncher[736300]: osdx.utils.xos cmd error: /sbin/ethtool -A eth0 autoneg on Jun 03 18:13:22.705558 osdx modulelauncher[736300]: Command '/sbin/ethtool -A eth0 autoneg on' returned non-zero exit status 76. Jun 03 18:13:22.707931 osdx modulelauncher[736300]: osdx.utils.xos cmd error: /sbin/ethtool -s eth0 autoneg on advertise Asym_Pause off Pause off -- Jun 03 18:13:22.707946 osdx modulelauncher[736300]: Command '/sbin/ethtool -s eth0 autoneg on advertise Asym_Pause off Pause off --' returned non-zero exit status 75. Jun 03 18:13:22.838150 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Jun 03 18:13:22.857855 osdx sshd[736363]: Server listening on 0.0.0.0 port 22. Jun 03 18:13:22.857887 osdx sshd[736363]: Server listening on :: port 22. Jun 03 18:13:22.858266 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server. Jun 03 18:13:23.049227 osdx cfgd[1768]: [623229]Completed change to active configuration Jun 03 18:13:23.049902 osdx OSDxCLI[623229]: User 'admin' committed the configuration. Jun 03 18:13:23.079811 osdx OSDxCLI[623229]: User 'admin' left the configuration menu. Jun 03 18:13:23.237920 osdx OSDxCLI[623229]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Jun 03 18:13:25.317019 osdx OSDxCLI[623229]: User 'admin' entered the configuration menu. Jun 03 18:13:25.413737 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'. Jun 03 18:13:25.468123 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'. Jun 03 18:13:25.564089 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'. Jun 03 18:13:25.628478 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'. Jun 03 18:13:25.724714 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'. Jun 03 18:13:25.790259 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'. Jun 03 18:13:25.906188 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 199100fbe8b7092a2a90b86838160a00cb240b273ccd975d9cf1fbbfd2470d79'. Jun 03 18:13:25.957501 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'. Jun 03 18:13:26.063779 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'set service dns resolver local'. Jun 03 18:13:26.157948 osdx OSDxCLI[623229]: User 'admin' added a new cfg line: 'show working'. Jun 03 18:13:26.246145 osdx ubnt-cfgd[736427]: inactive Jun 03 18:13:26.270929 osdx INFO[736436]: FRR daemons did not change Jun 03 18:13:26.331211 osdx ca-certificates[736452]: Updating certificates in /etc/ssl/certs... Jun 03 18:13:26.940139 osdx ubnt-cfgd[737464]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL Jun 03 18:13:26.950818 osdx ca-certificates[737468]: 1 added, 0 removed; done. Jun 03 18:13:26.953747 osdx ca-certificates[737476]: Running hooks in /etc/ca-certificates/update.d... Jun 03 18:13:26.957181 osdx ca-certificates[737478]: done. Jun 03 18:13:27.102141 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy. Jun 03 18:13:27.117959 osdx cfgd[1768]: [623229]Completed change to active configuration Jun 03 18:13:27.118744 osdx OSDxCLI[623229]: User 'admin' committed the configuration. Jun 03 18:13:27.143961 osdx OSDxCLI[623229]: User 'admin' left the configuration menu. Jun 03 18:13:27.337584 osdx OSDxCLI[623229]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Jun 03 18:13:27.348099 osdx dnscrypt-proxy[737534]: dnscrypt-proxy 2.0.45 Jun 03 18:13:27.348154 osdx dnscrypt-proxy[737534]: Network connectivity detected Jun 03 18:13:27.348337 osdx dnscrypt-proxy[737534]: Dropping privileges Jun 03 18:13:27.350848 osdx dnscrypt-proxy[737534]: Network connectivity detected Jun 03 18:13:27.350874 osdx dnscrypt-proxy[737534]: Now listening to 127.0.0.1:53 [UDP] Jun 03 18:13:27.350878 osdx dnscrypt-proxy[737534]: Now listening to 127.0.0.1:53 [TCP] Jun 03 18:13:27.350894 osdx dnscrypt-proxy[737534]: Firefox workaround initialized Jun 03 18:13:27.350897 osdx dnscrypt-proxy[737534]: Loading the set of cloaking rules from [/tmp/tmp7v7c4x_d] Jun 03 18:13:27.593905 osdx dnscrypt-proxy[737534]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867 Jun 03 18:13:27.594081 osdx dnscrypt-proxy[737534]: [DUT0] OK (DoH) - rtt: 120ms Jun 03 18:13:27.594091 osdx dnscrypt-proxy[737534]: Server with the lowest initial latency: DUT0 (rtt: 120ms) Jun 03 18:13:27.594097 osdx dnscrypt-proxy[737534]: dnscrypt-proxy is ready - live servers: 1 Jun 03 18:13:27.711875 osdx OSDxCLI[623229]: User 'admin' executed a new command: 'show host lookup teldat.com type A'.