I am running libvirt/qemu-kvm on Fedora32, guest OS is win10 with spice-guest-tool in use.
I use ‘nat’ mode virtual networking.
root@fedora ~)# virsh net-dumpxml default <network connections='1'> <name>default</name> <uuid>36ca4070-160a-47bf-b35e-aa7bee028ec1</uuid> <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> <bridge name='virbr0' stp='on' delay='0'/> <mac address='52:54:00:e1:1e:c3'/> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254'/> </dhcp> </ip> </network>
While guest is running, ‘brctl show‘ seems fine.
(root@fedora ~)# brctl show bridge name bridge id STP enabled interfaces virbr0 8000.525400e11ec3 yes virbr0-nic vnet0
On host I can ping guest by its ip (192.168.122.159).
On guest, I can access internet, also can ssh to my host,
but failed to access samba and ftp on my host.
For example, I type ‘net view 192.168.122.1‘ on guest,
host ‘tcpdump -i vnet0‘ shows:
15:47:39.041395 IP 192.168.122.159.49717 > fedora.bear.microsoft-ds: Flags (S), seq 160880283, win 64240, options (mss 1460,nop,wscale 8,nop,nop,sackOK), length 0 15:47:39.041526 IP fedora.bear > 192.168.122.159: ICMP fedora.bear tcp port microsoft-ds unreachable, length 60
And ‘net view’ eventually reports ‘System error 53: network path not found‘.
I also checked ‘iptables -L -v‘ (too verbose to paste here), no one got ‘REJECT’ed.
In case of ‘ftp’, it is similar to ‘samba’.
15:54:13.232366 IP 192.168.122.159.49721 > fedora.bear.ftp: Flags (S), seq 669575524, win 8192, options (mss 1460,nop,wscale 0,nop,nop,sackOK), length 0 15:54:13.232468 IP fedora.bear > 192.168.122.159: ICMP fedora.bear tcp port ftp unreachable, length 60
It seems that host can not send package back to guest.
Am I missing something? What could be the cause?