List Server

Test suite to validate domain/IP blocking and whitelisting

Server Blocklist Domain

Description

Performs a lookup over a domain that has been blocked.

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 blocklist ip address 10.215.168.42
set service dns proxy blocklist name domain '*sex*'
set service dns proxy blocklist name domain example.org
set service dns proxy blocklist name domain teldat.com
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 2bf8e614357d7ffe91a319d2d25e8046a64f2d349a757e66b5e8c8ccea2231f5
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 server-name DUT0
set service dns proxy static DUT0 protocol dns-over-https hash 34312735044c5843c92025663326297c7de20685f9734c3ef9a45476d18503b5
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 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 show host lookup teldat.com type A at DUT1 and check if output contains the following tokens:

This query has been locally blocked
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
teldat.com host information "This query has been locally blocked" "by dnscrypt-proxy"

Step 4: Run command show host lookup sex.example.page type A at DUT1 and check if output contains the following tokens:

This query has been locally blocked
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
sex.example.page host information "This query has been locally blocked" "by dnscrypt-proxy"

Step 5: Run command show host lookup blocked-ip.net type A at DUT1 and check if output contains the following tokens:

This query has been locally blocked
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
blocked-ip.net host information "This query has been locally blocked" "by dnscrypt-proxy"

Server Whitelist Domain

Description

Performs a lookup over a domain that has been whitelisted.

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 blocklist ip address 10.215.168.42
set service dns proxy blocklist name domain '*sex*'
set service dns proxy blocklist name domain example.org
set service dns proxy blocklist name domain teldat.com
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 2bf8e614357d7ffe91a319d2d25e8046a64f2d349a757e66b5e8c8ccea2231f5
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 proxy whitelist name domain teldat.com
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 server-name DUT0
set service dns proxy static DUT0 protocol dns-over-https hash 34312735044c5843c92025663326297c7de20685f9734c3ef9a45476d18503b5
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 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 show host lookup teldat.com type A at DUT1 and check if output contains the following tokens:

teldat.com has address 10.11.12.13
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
teldat.com has address 10.11.12.13

Step 4: Run command show host lookup sex.example.page type A at DUT1 and check if output contains the following tokens:

This query has been locally blocked
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
sex.example.page host information "This query has been locally blocked" "by dnscrypt-proxy"

Step 5: Run command show host lookup blocked-ip.net type A at DUT1 and check if output contains the following tokens:

This query has been locally blocked
Show output
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
blocked-ip.net host information "This query has been locally blocked" "by dnscrypt-proxy"