KVM/Bridge: No Route To Host

不问归期 提交于 2019-12-01 10:50:45

问题


I've setup a VM on Fedora 17 with KVM and have configured a bridge network for the KVM. Both the host and the VM use manual IP configuration, with the host's IP as 192.168.0.2, the VM's 192.168.0.10. From the VM I can connect to the host without any problems, but from the host I can't SSH to the VM,even though I still can ping the KVM from the host. Trying to ssh just gives me the result "no route to host".

Oh, I have iptables disabled so I don't think this is the problem of the firewall.


回答1:


Also ensure that the kernel is configure for ip forwarding:

$ sudo sysctl -a | grep net.ipv4.ip_forward
net.ipv4.ip_forward = 1

It should have a value of 1, not 0. If needed, enable with these commands:

echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf



回答2:


There are two ways :

* Using proxy tunnel to create a channel for host from guest : From guest run following command : ssh -L 2000:localhost_ip:2000 username@hostip

explore ssh man to get the inside.

* Difficult to setup, but proper configuration while running guest : follow http://www.cse.iitd.ernet.in/~prathmesh/random.html#Connecting_qemu_guest_to_real_network



来源:https://stackoverflow.com/questions/12104587/kvm-bridge-no-route-to-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!