Since on the HVM I have no firewall running, I don't have to open it.
When pinging from the source to the destination (HVM), I see the ICMP
echo requests arriving on the destination (10.137.2.12), however, in
order to answer it does an ARP request to obtain the MAC address of
10.137.2.10, which it thinks is in the same subnet (10.137.2.0/24).
Looking how the NIC is configured in an AppVM, I see (ifconfig eth0) an
IP 10.137.2.10 with an broadcast 10.255.255.255 and a netmask
255.255.255.255 which seems just plain wrong to me.
Any idea on how to configure the network in the HVM to make the inter-VM
networking work?
BTW, I did this all on Qubes 3.1RC2
I think I had exactly the same problem yesterday I tried to access
the network shares of a Windows HVM from a Linux AppVM. This worked
using the "-I FORWARD" iptables rule on Qubes 3.0, but stopped working
on Qubes 3.1.
Solution: Qubes 3.1 disables ProxyARP by default; enable it on your
Firewall VM:
echo 1 > /proc/sys/net/ipv4/conf/$DEST_DEV/proxy_arp
where DEST_DEV is the device name of your target VM.
That did the trick in my case.
Stefan. > Solution: Qubes 3.1 disables ProxyARP by default; enable it on your
> Firewall VM:
>
> echo 1 > /proc/sys/net/ipv4/conf/$DEST_DEV/proxy_arp
>
> where DEST_DEV is the device name of your target VM.
>
>
> That did the trick in my case.
Can you describe exactly your setup, including network configuration in
Windows? "route print" command output from there would be useful.
sudo iptables -I FORWARD 2 -s 10.137.3.15 -d 10.137.3.13 -j ACCEPT
pinging didn't work, so I started digging… this is the routing of the FirewallVM:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.137.2.1 0.0.0.0 UG 0 0 0 eth0
10.137.2.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
10.137.3.13 0.0.0.0 255.255.255.255 UH 32744 0 0 vif8.0
10.137.3.13 0.0.0.0 255.255.255.255 UH 32745 0 0 vif7.0
10.137.3.15 0.0.0.0 255.255.255.255 UH 32747 0 0 vif5.0
Note that the Windows VM has two interfaces (for whatever reason).
Sniffing with Wireshark on vif7.0 showed no traffic. vif8.0 revealed that:
- the icmp requests arrive on the interface
- Windows sends ARP requests for 10.137.3.15
- ...but gets no ARP response
Manually adding an ARP entry didn't do the trick. Windows now sent ping replies (visible on vif8.0), but they didn't reach the Linux AppVM.
Enabling proxy_arp for vif8.0 solved the problem.
Enclosed is a screenshot of Windows' "route print" (sorry, no Qubes Tools, no copy-paste).
Hope this helps :-)
Stefan.
Replace X with the number for the network you have, whether it's a 1/2/3/4/5/6/7/8/9/10/11/12/13 ... etc...
My personal script auto detects the IPs upon boot. Then sets everything accordingly.
So as you can see, it works, and I have been using this for a long time.
#--------------------------------------------
intervm_internalnet='10.137.X.0';
# Sets iptables so that anything targeting local network can find itself. Only use for interVM machine.
iptables -I FORWARD 1 -i vif+ -o vif+ -s $intervm_internalnet/24 -d $intervm_internalnet/24 -m state --state NEW -p tcp -m tcp -j ACCEPT
iptables -I FORWARD 1 -i vif+ -o vif+ -s $intervm_internalnet/24 -d $intervm_internalnet/24 -p udp -m udp -j ACCEPT
#--------------------------------------------