I’m having difficulty getting AppVM’s X and Y networking via firewall F, using nftables instructions from here . I can ping both ways from F to either X or Y, but can’t ping or netcat from X to Y. tcpdump on F when pinging from X to Y shows incoming echo requests, like so:
21:59:18.097468 vif60.0 In IP 10.137.0.47 > 10.137.0.56: ICMP echo request, id 5, seq 1, length 64
But no outgoing echo request like when pinging from F to Y, like so:
22:02:03.613687 vif59.0 Out IP sys-firewall-persist > 10.137.0.56: ICMP echo request, id 2, seq 2, length 64
22:02:03.614384 vif59.0 In IP 10.137.0.56 > sys-firewall-persist: ICMP echo reply, id 2, seq 2, length 64
I have rules in chain custom-forward that seem to allow forwarding from X to Y:
nft list chain qubes custom-forward | grep 47
ip saddr 10.137.0.56 ip daddr 10.137.0.47 ct state established,related,new counter packets 0 bytes 0 accept
ip saddr 10.137.0.47 ip daddr 10.137.0.56 ct state established,related,new counter packets 0 bytes 0 accept
I’m wondering if my packages get dropped before even getting to custom-forward: When looking at nft list ruleset
, I see
[root@sys-firewall-persist config]# nft list ruleset | grep -B1 -A4 'chain forward'
chain forward {
type filter hook forward priority filter; policy accept;
jump custom-forward
ct state invalid counter packets 0 bytes 0 drop
ct state established,related accept
--
chain forward {
type filter hook forward priority filter; policy accept;
jump custom-forward
ct state invalid counter packets 0 bytes 0 drop
ct state established,related accept
--
table ip qubes-firewall {
chain forward {
type filter hook forward priority filter; policy drop;
ct state established,related accept
iifname != "vif*" accept
}
--
table ip6 qubes-firewall {
chain forward {
type filter hook forward priority filter; policy drop;
ct state established,related accept
iifname != "vif*" accept
}
The jump to custom-forward is only included in the qubes table, but not in the qubes-firewall table. The qubes-firewall chain has the same priority as the qubes table chain, and has a ‘drop’ policy. Could it be that a non-established/related packet just gets dropped by the table qubes-firewall chain forward policy before the table qubes chain forward would jump to custom-forward? If so, is that a bug or a feature, and if feature how do I network between X and Y?