Listen Address Server

Test suite to validate DNS Proxy listen-address configuration. It simply configures a DNS server that may or may not block queries or even servers.

IPv4 Address Server

Description

DUT0 is configured on a specific IPv4 address and then checked by the local resolver to see if it works as expected.

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 listen-address 10.215.168.64 port 53
set service dns proxy server-name RD
set service dns proxy static RD protocol dns-over-https hash 654360ee51829bf4a8cea9c41e387b649d8a86841ca20ec804f6d7b17eea4854
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 resolver name-server 10.215.168.64
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 resolver name-server 10.215.168.64
set service ssh
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
teldat.com has address 10.11.12.13

IPv4 Address Server With Port Changed

Description

DUT0 is configured on a specific IPv4 address and a different port, then checked by the local resolver to see if it works properly.

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 forwarding name-server 10.215.168.64 port 5353
set service dns proxy listen-address 10.215.168.64 port 5353
set service dns proxy server-name RD
set service dns proxy static RD protocol dns-over-https hash 654360ee51829bf4a8cea9c41e387b649d8a86841ca20ec804f6d7b17eea4854
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 resolver local
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 forwarding name-server 10.215.168.64 port 5353
set service dns resolver local
set service ssh
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
teldat.com has address 10.11.12.13

IPv6 Address Server

Description

DUT0 is configured on a specific IPv6 address and then checked by the local resolver to see if it works properly.

Scenario

Step 1: Run command configure at DUT0 and expect this output: Step 2: Run command set interfaces ethernet eth1 address 10::2/64 at DUT0 and expect this output: Step 3: Run command commit at DUT0 and expect this output: Step 4: Ping IP address 10::2 from DUT0:

admin@DUT0$ ping 10::2 count 1 size 56 timeout 1
Show output
PING 10::2(10::2) 56 data bytes
64 bytes from 10::2: icmp_seq=1 ttl=64 time=0.019 ms

--- 10::2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.019/0.019/0.019/0.000 ms

Step 5: Run command configure at DUT1 and expect this output: Step 6: Run command set interfaces ethernet eth1 address 10::20/64 at DUT1 and expect this output: Step 7: Run command commit at DUT1 and expect this output: Step 8: Ping IP address 10::20 from DUT1:

admin@DUT1$ ping 10::20 count 1 size 56 timeout 1
Show output
PING 10::20(10::20) 56 data bytes
64 bytes from 10::20: icmp_seq=1 ttl=64 time=0.023 ms

--- 10::20 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.023/0.023/0.023/0.000 ms

Step 9: Run command configure at DUT0 and expect this output: Step 10: Run command set system certificate trust running://remote.dns-server.crt at DUT0 and expect this output: Step 11: Run command set service dns proxy server-name RD at DUT0 and expect this output: Step 12: Run command set service dns proxy static RD protocol dns-over-https host name remote.dns at DUT0 and expect this output: Step 13: Run command set service dns proxy static RD protocol dns-over-https ip 10.215.168.1 at DUT0 and expect this output: Step 14: Run command set service dns proxy static RD protocol dns-over-https hash 654360ee51829bf4a8cea9c41e387b649d8a86841ca20ec804f6d7b17eea4854 at DUT0 and expect this output: Step 15: Run command set service dns static host-name teldat.com inet 10.11.12.13 at DUT0 and expect this output: Step 16: Run command set service dns proxy listen-address 10::2 port 53 at DUT0 and expect this output: Step 17: Run command set service dns resolver name-server 10::2 at DUT0 and expect this output: Step 18: Run command commit at DUT0 and expect this output:

Show output
[ system certificate trust running://remote.dns-server.crt ]
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL

Step 19: Run command configure at DUT1 and expect this output: Step 20: Run command set service dns resolver name-server 10::2 at DUT1 and expect this output: Step 21: Run command commit at DUT1 and expect this output: Step 22: 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
teldat.com has address 10.11.12.13

IPv6 Address Server With Port Changed

Description

DUT0 is configured on a specific IPv6 address and a different port, and then checked by the local resolver to see if it works properly.

Scenario

Step 1: Run command configure at DUT0 and expect this output: Step 2: Run command set interfaces ethernet eth1 address 10::2/64 at DUT0 and expect this output: Step 3: Run command commit at DUT0 and expect this output: Step 4: Ping IP address 10::2 from DUT0:

admin@DUT0$ ping 10::2 count 1 size 56 timeout 1
Show output
PING 10::2(10::2) 56 data bytes
64 bytes from 10::2: icmp_seq=1 ttl=64 time=0.015 ms

--- 10::2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.015/0.015/0.015/0.000 ms

Step 5: Run command configure at DUT1 and expect this output: Step 6: Run command set interfaces ethernet eth1 address 10::20/64 at DUT1 and expect this output: Step 7: Run command commit at DUT1 and expect this output: Step 8: Ping IP address 10::20 from DUT1:

admin@DUT1$ ping 10::20 count 1 size 56 timeout 1
Show output
PING 10::20(10::20) 56 data bytes
64 bytes from 10::20: icmp_seq=1 ttl=64 time=0.021 ms

--- 10::20 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.021/0.021/0.021/0.000 ms

Step 9: Run command configure at DUT0 and expect this output: Step 10: Run command set system certificate trust running://remote.dns-server.crt at DUT0 and expect this output: Step 11: Run command set service dns proxy server-name RD at DUT0 and expect this output: Step 12: Run command set service dns proxy static RD protocol dns-over-https host name remote.dns at DUT0 and expect this output: Step 13: Run command set service dns proxy static RD protocol dns-over-https ip 10.215.168.1 at DUT0 and expect this output: Step 14: Run command set service dns proxy static RD protocol dns-over-https hash 654360ee51829bf4a8cea9c41e387b649d8a86841ca20ec804f6d7b17eea4854 at DUT0 and expect this output: Step 15: Run command set service dns static host-name teldat.com inet 10.11.12.13 at DUT0 and expect this output: Step 16: Run command set service dns proxy listen-address 10::2 port 5353 at DUT0 and expect this output: Step 17: Run command set service dns resolver local at DUT0 and expect this output: Step 18: Run command set service dns forwarding name-server 10::2 port 5353 at DUT0 and expect this output: Step 19: Run command commit at DUT0 and expect this output:

Show output
[ system certificate trust running://remote.dns-server.crt ]
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL

Step 20: Run command configure at DUT1 and expect this output: Step 21: Run command set service dns resolver local at DUT1 and expect this output: Step 22: Run command set service dns forwarding name-server 10::2 port 5353 at DUT1 and expect this output: Step 23: Run command commit at DUT1 and expect this output: Step 24: 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
teldat.com has address 10.11.12.13