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 ce5bfb07edc17945305c52b77f54ddda93ca3edba3b5213add895927eb42f82a 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 4fe921b578eb3463029b62a21be6eb0c95dc596d0f4cac6e3baa3d349306cc7a 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
Jun 24 15:18:41.334877 osdx systemd-journald[1554]: Runtime Journal (/run/log/journal/c46306ce94da41d08ec4fbe6b50ef5f9) is 1000.0K, max 7.2M, 6.3M free. Jun 24 15:18:41.336789 osdx systemd-journald[1554]: Received client request to rotate journal, rotating. Jun 24 15:18:41.336861 osdx systemd-journald[1554]: Vacuuming done, freed 0B of archived journals from /run/log/journal/c46306ce94da41d08ec4fbe6b50ef5f9. Jun 24 15:18:41.346840 osdx OSDxCLI[143450]: User 'admin' executed a new command: 'system journal clear'. Jun 24 15:18:41.595119 osdx OSDxCLI[143450]: User 'admin' executed a new command: 'system coredump delete all'. Jun 24 15:18:42.755892 osdx OSDxCLI[143450]: User 'admin' entered the configuration menu. Jun 24 15:18:42.848901 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'. Jun 24 15:18:42.941340 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. Jun 24 15:18:42.998155 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set service ssh'. Jun 24 15:18:43.122740 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'show working'. Jun 24 15:18:43.217215 osdx ubnt-cfgd[254636]: inactive Jun 24 15:18:43.243279 osdx INFO[254650]: FRR daemons did not change Jun 24 15:18:43.268805 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 Jun 24 15:18:43.421283 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Jun 24 15:18:43.432847 osdx sshd[254764]: Server listening on 0.0.0.0 port 22. Jun 24 15:18:43.433042 osdx sshd[254764]: Server listening on :: port 22. Jun 24 15:18:43.433151 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server. Jun 24 15:18:43.453265 osdx cfgd[1254]: [143450]Completed change to active configuration Jun 24 15:18:43.464264 osdx OSDxCLI[143450]: User 'admin' committed the configuration. Jun 24 15:18:43.495005 osdx OSDxCLI[143450]: User 'admin' left the configuration menu. Jun 24 15:18:43.654999 osdx OSDxCLI[143450]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'. Jun 24 15:18:45.555052 osdx OSDxCLI[143450]: User 'admin' entered the configuration menu. Jun 24 15:18:45.659966 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'. Jun 24 15:18:45.718921 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'. Jun 24 15:18:45.807061 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'. Jun 24 15:18:45.877836 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'. Jun 24 15:18:45.971067 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'. Jun 24 15:18:46.059034 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'. Jun 24 15:18:46.161522 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash 4fe921b578eb3463029b62a21be6eb0c95dc596d0f4cac6e3baa3d349306cc7a'. Jun 24 15:18:46.239134 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'. Jun 24 15:18:46.346899 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'set service dns resolver local'. Jun 24 15:18:46.462001 osdx OSDxCLI[143450]: User 'admin' added a new cfg line: 'show working'. Jun 24 15:18:46.547973 osdx ubnt-cfgd[254821]: inactive Jun 24 15:18:46.571734 osdx INFO[254829]: FRR daemons did not change Jun 24 15:18:46.583661 osdx ca-certificates[254845]: Updating certificates in /etc/ssl/certs... Jun 24 15:18:47.061603 osdx ubnt-cfgd[255843]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL Jun 24 15:18:47.071770 osdx ca-certificates[255849]: 1 added, 0 removed; done. Jun 24 15:18:47.074691 osdx ca-certificates[255855]: Running hooks in /etc/ca-certificates/update.d... Jun 24 15:18:47.077530 osdx ca-certificates[255857]: done. Jun 24 15:18:47.197163 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy. Jun 24 15:18:47.198528 osdx cfgd[1254]: [143450]Completed change to active configuration Jun 24 15:18:47.201389 osdx OSDxCLI[143450]: User 'admin' committed the configuration. Jun 24 15:18:47.218492 osdx OSDxCLI[143450]: User 'admin' left the configuration menu. Jun 24 15:18:47.220804 osdx dnscrypt-proxy[255917]: dnscrypt-proxy 2.0.45 Jun 24 15:18:47.221056 osdx dnscrypt-proxy[255917]: Network connectivity detected Jun 24 15:18:47.221277 osdx dnscrypt-proxy[255917]: Dropping privileges Jun 24 15:18:47.223296 osdx dnscrypt-proxy[255917]: Network connectivity detected Jun 24 15:18:47.223496 osdx dnscrypt-proxy[255917]: Now listening to 127.0.0.1:53 [UDP] Jun 24 15:18:47.223536 osdx dnscrypt-proxy[255917]: Now listening to 127.0.0.1:53 [TCP] Jun 24 15:18:47.223590 osdx dnscrypt-proxy[255917]: Firefox workaround initialized Jun 24 15:18:47.223623 osdx dnscrypt-proxy[255917]: Loading the set of cloaking rules from [/tmp/tmp1pa0hw6f] Jun 24 15:18:47.434761 osdx OSDxCLI[143450]: User 'admin' executed a new command: 'system journal show | cat'. Jun 24 15:18:47.483900 osdx dnscrypt-proxy[255917]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867 Jun 24 15:18:47.483918 osdx dnscrypt-proxy[255917]: [DUT0] OK (DoH) - rtt: 123ms Jun 24 15:18:47.483927 osdx dnscrypt-proxy[255917]: Server with the lowest initial latency: DUT0 (rtt: 123ms) Jun 24 15:18:47.483933 osdx dnscrypt-proxy[255917]: dnscrypt-proxy is ready - live servers: 1