KVM端口绑定

我按照这个教程在我的Ubuntu服务器上安装了KVM虚拟机。 现在我需要将一个端口从客户端绑定到主机。 我尝试了几个教程来绑定端口,但没有任何工作。

我的设置是:


主机:Ubuntu 14.04,IP:192.168.122.1(KVM IP),我可以到达主机的IP地址:10.211.55.4

eth1 Link encap:Ethernet HWaddr 00:1c:42:d0:7a:75 inet addr:10.211.55.4 Bcast:10.211.55.255 Mask:255.255.255.0 inet6 addr: fe80::21c:42ff:fed0:7a75/64 Scope:Link inet6 addr: fdb2:2c26:f4e4:0:21c:42ff:fed0:7a75/64 Scope:Global inet6 addr: fdb2:2c26:f4e4:0:19bb:354a:25f2:6d0f/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:701 errors:0 dropped:0 overruns:0 frame:0 TX packets:218 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:110682 (110.6 KB) TX bytes:28366 (28.3 KB) virbr0 Link encap:Ethernet HWaddr fe:54:00:9e:7b:58 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:131 errors:0 dropped:0 overruns:0 frame:0 TX packets:112 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:15021 (15.0 KB) TX bytes:11985 (11.9 KB) 

游客:Ubuntu 14.04,IP:192.168.122.141

 eth0 Link encap:Ethernet HWaddr 52:54:00:9e:7b:58 inet addr:192.168.122.141 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::5054:ff:fe9e:7b58/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:404 errors:0 dropped:3 overruns:0 frame:0 TX packets:186 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:33867 (33.8 KB) TX bytes:24842 (24.8 KB) 

任何人都可以帮助我绑定例如端口80从客人到主机,所以我可以从客户的Web服务器与http://10.211.55.4 ?

非常感谢!

要么将虚拟机连接到“外部”networking,要么设置iptables并为所需的端口创build一个DNAt条目。