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 f012756fda3a0f7b545bee800131852f93b004603c72fb7b24f62cc68bdd865c
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 c2531c232f617fca1d28e61bdeeeccc6f8e440aee3a76e791e1580dc72a9a46b
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
Apr 06 14:27:40.273195 osdx systemd-journald[1758]: Runtime Journal (/run/log/journal/862cb27bfeac4475836e13336dc829f0) is 948.0K, max 6.5M, 5.5M free.
Apr 06 14:27:40.273543 osdx systemd-journald[1758]: Received client request to rotate journal, rotating.
Apr 06 14:27:40.273577 osdx systemd-journald[1758]: Vacuuming done, freed 0B of archived journals from /run/log/journal/862cb27bfeac4475836e13336dc829f0.
Apr 06 14:27:40.285786 osdx OSDxCLI[2067]: User 'admin' executed a new command: 'system journal clear'.
Apr 06 14:27:40.489768 osdx OSDxCLI[2067]: User 'admin' executed a new command: 'system coredump delete all'.
Apr 06 14:27:41.588753 osdx OSDxCLI[2067]: User 'admin' entered the configuration menu.
Apr 06 14:27:41.666241 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.65/24'.
Apr 06 14:27:41.754214 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'.
Apr 06 14:27:41.850411 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set service ssh'.
Apr 06 14:27:41.919150 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'show working'.
Apr 06 14:27:42.009059 osdx ubnt-cfgd[51673]: inactive
Apr 06 14:27:42.037249 osdx INFO[51685]: FRR daemons did not change
Apr 06 14:27:42.061410 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Apr 06 14:27:42.109222 osdx WARNING[51753]: No supported link modes on interface eth0
Apr 06 14:27:42.110586 osdx modulelauncher[51753]: osdx.utils.xos cmd error: /sbin/ethtool -A eth0 autoneg on
Apr 06 14:27:42.110598 osdx modulelauncher[51753]: Command '/sbin/ethtool -A eth0 autoneg on' returned non-zero exit status 76.
Apr 06 14:27:42.111741 osdx modulelauncher[51753]: osdx.utils.xos cmd error: /sbin/ethtool -s eth0 autoneg on advertise Asym_Pause off Pause off --
Apr 06 14:27:42.111751 osdx modulelauncher[51753]: Command '/sbin/ethtool -s eth0 autoneg on advertise Asym_Pause off Pause off --' returned non-zero exit status 75.
Apr 06 14:27:42.205968 osdx systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Apr 06 14:27:42.217474 osdx sshd[51804]: Server listening on 0.0.0.0 port 22.
Apr 06 14:27:42.217497 osdx sshd[51804]: Server listening on :: port 22.
Apr 06 14:27:42.217591 osdx systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Apr 06 14:27:42.241854 osdx cfgd[1457]: [2067]Completed change to active configuration
Apr 06 14:27:42.256637 osdx OSDxCLI[2067]: User 'admin' committed the configuration.
Apr 06 14:27:42.272590 osdx OSDxCLI[2067]: User 'admin' left the configuration menu.
Apr 06 14:27:42.440267 osdx OSDxCLI[2067]: User 'admin' executed a new command: 'ping 10.215.168.64 count 1 size 56 timeout 1'.
Apr 06 14:27:44.271428 osdx OSDxCLI[2067]: User 'admin' entered the configuration menu.
Apr 06 14:27:44.354038 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set service dns static host-name dns.dut0 inet 10.215.168.64'.
Apr 06 14:27:44.409327 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set system certificate trust running://CA.crt'.
Apr 06 14:27:44.495549 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set service dns proxy server-name DUT0'.
Apr 06 14:27:44.561044 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host name dns.dut0'.
Apr 06 14:27:44.685853 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https host port 3000'.
Apr 06 14:27:44.742511 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https ip 10.215.168.64'.
Apr 06 14:27:44.837375 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set service dns proxy static DUT0 protocol dns-over-https hash c2531c232f617fca1d28e61bdeeeccc6f8e440aee3a76e791e1580dc72a9a46b'.
Apr 06 14:27:44.890515 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set service dns proxy log level 0'.
Apr 06 14:27:44.997495 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'set service dns resolver local'.
Apr 06 14:27:45.061939 osdx OSDxCLI[2067]: User 'admin' added a new cfg line: 'show working'.
Apr 06 14:27:45.163127 osdx ubnt-cfgd[51863]: inactive
Apr 06 14:27:45.181609 osdx INFO[51871]: FRR daemons did not change
Apr 06 14:27:45.192968 osdx ca-certificates[51887]: Updating certificates in /etc/ssl/certs...
Apr 06 14:27:45.660318 osdx ubnt-cfgd[52899]: rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
Apr 06 14:27:45.667403 osdx ca-certificates[52905]: 1 added, 0 removed; done.
Apr 06 14:27:45.670229 osdx ca-certificates[52911]: Running hooks in /etc/ca-certificates/update.d...
Apr 06 14:27:45.672878 osdx ca-certificates[52913]: done.
Apr 06 14:27:45.785708 osdx systemd[1]: Started dnscrypt-proxy.service - DNSCrypt client proxy.
Apr 06 14:27:45.787243 osdx cfgd[1457]: [2067]Completed change to active configuration
Apr 06 14:27:45.791391 osdx OSDxCLI[2067]: User 'admin' committed the configuration.
Apr 06 14:27:45.806229 osdx OSDxCLI[2067]: User 'admin' left the configuration menu.
Apr 06 14:27:45.821363 osdx dnscrypt-proxy[52973]: dnscrypt-proxy 2.0.45
Apr 06 14:27:45.821451 osdx dnscrypt-proxy[52973]: Network connectivity detected
Apr 06 14:27:45.821741 osdx dnscrypt-proxy[52973]: Dropping privileges
Apr 06 14:27:45.824239 osdx dnscrypt-proxy[52973]: Network connectivity detected
Apr 06 14:27:45.824267 osdx dnscrypt-proxy[52973]: Now listening to 127.0.0.1:53 [UDP]
Apr 06 14:27:45.824271 osdx dnscrypt-proxy[52973]: Now listening to 127.0.0.1:53 [TCP]
Apr 06 14:27:45.824286 osdx dnscrypt-proxy[52973]: Firefox workaround initialized
Apr 06 14:27:45.824290 osdx dnscrypt-proxy[52973]: Loading the set of cloaking rules from [/tmp/tmpvznm_o7i]
Apr 06 14:27:45.913999 osdx dnscrypt-proxy[52973]: [DUT0] TLS version: 304 - Protocol: h2 - Cipher suite: 4867
Apr 06 14:27:45.914013 osdx dnscrypt-proxy[52973]: [DUT0] OK (DoH) - rtt: 13ms
Apr 06 14:27:45.914021 osdx dnscrypt-proxy[52973]: Server with the lowest initial latency: DUT0 (rtt: 13ms)
Apr 06 14:27:45.914025 osdx dnscrypt-proxy[52973]: dnscrypt-proxy is ready - live servers: 1