It does use the same rules
To illustrate, we start a dispVM using mirage-firewall as its netvm:
user@dom0:~$ qvm-ls disp2376
NAME STATE CLASS LABEL TEMPLATE NETVM
disp2376 Running DispVM red default-dvm mirage-firewall
The default firewall settings are applied, and we can ping and browse to “dns.google” (8.8.8.8) :
user@dom0:~$ qvm-firewall disp2376 list
NO ACTION HOST PROTOCOL PORT(S) SPECIAL TARGET ICMP TYPE EXPIRE COMMENT
0 accept - - - - - - -
[user@disp2376 ~]$ ping -c 3 dns.google
PING dns.google (8.8.8.8) 56(84) bytes of data.
64 bytes from dns.google (8.8.8.8): icmp_seq=1 ttl=114 time=28.0 ms
64 bytes from dns.google (8.8.8.8): icmp_seq=2 ttl=114 time=24.9 ms
64 bytes from dns.google (8.8.8.8): icmp_seq=3 ttl=114 time=24.1 ms
--- dns.google ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 24.050/25.667/28.045/1.717 ms
[user@disp2376 ~]$
[user@disp2376 ~]$ curl https://dns.google
<!DOCTYPE html>
<html lang="en"> <head> <title>Google Public DNS</title> [... truncated...] </html>
[user@disp2376 ~]$
Note that DNS and curl both work.
Now let’s remove the default Qubes firewall rule for this dispVM:
user@dom0:~$ qvm-firewall disp2376 del --rule-no 0
user@dom0:~$ qvm-firewall disp2376 list
NO ACTION HOST PROTOCOL PORT(S) SPECIAL TARGET ICMP TYPE EXPIRE COMMENT
user@dom0:~$
Now DNS, ping, and curl don’t work any more on the dispVM:
[user@disp2376 ~]$ ping -c 3 dns.google
^C
[user@disp2376 ~]$ ping -c 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2030ms
[user@disp2376 ~]$ curl https://dns.google
^C
[user@disp2376 ~]$
Now let’s allow port 443/tcp to 8.8.8.8 :
user@dom0:~$ qvm-firewall disp2376 add action=accept proto=tcp dst4=8.8.8.8 dstports=443
user@dom0:~$
user@dom0:~$ qvm-firewall disp2376 list
NO ACTION HOST PROTOCOL PORT(S) SPECIAL TARGET ICMP TYPE EXPIRE COMMENT
0 accept 8.8.8.8/32 tcp 443 - - - -
user@dom0:~$
And, surprise-surprise, we can reach now https://8.8.8.8 from our dispVM! (but not https://dns.google, because DNS is still blocked, as is ping/icmp)
[user@disp2376 ~]$ curl https://dns.google
^C
[user@disp2376 ~]$ curl https://8.8.8.8
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://dns.google/">here</A>.
</BODY></HTML>
[user@disp2376 ~]$ ping -c 3 -w 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2062ms