为什么我在Eucalyptus中使用NAT后无法使用物理IP访问我的网站
我有两台真机。
一台负责NAT和IP重定向,称为NC2,另一台负责eucalyptus KVM建立3个虚拟机。
毫无疑问,负责eucalyptus的机器的操作系统是Linux< /strong>.
虚拟机的客户操作系统是Windows XP。
每个虚拟机都是一个运行 Tomcat 的 Web 服务器
NC2 为 Linux 服务器提供一个私有 IP 192.168.0.3。
Linux 服务器为虚拟机提供 3 个私有 B 类 IP。< br> 例如,其中一个来宾操作系统获得了 IP 172.16.1.5
现在我使用 NC2 将物理 IP xxxx 重定向到 172.16.1.5
这是我的问题:
我可以使用其他电脑,外部IP,连接到在172.16.1.5上建立的网站,IP为xxxx,但我无法使用IP为的机器172.16.1.5 连接到它自己的网站。
我关闭了 172.16.1.5 上的防火墙,它能够连接到互联网,例如 yahoo 或 amazon。但它就是无法使用xxxx连接到它自己的网站。
我测试了其他获得 172.16.xx 的来宾操作系统,也无法连接到 xxxx。
如何使来宾操作系统连接其重定向的物理地址?
I have two real machines.
One is responsible for NAT and IP redirect called NC2 and another is responsible for eucalyptus KVM established 3 virtual machine.
No doubt, the OS of machine which is responsible for eucalyptus is Linux.
The guest OS of virtual machines are Windows XP.
Each virtual machine is a web server which runs Tomcat
NC2 gives an private IP 192.168.0.3 to Linux server.
Linux server gives 3 IPs which are private class B to virtual machines.
For example, one of guest OS gained IP 172.16.1.5
Now I use NC2 to redirect a physical IP x.x.x.x to 172.16.1.5
Here is my problem:
I can use other PC ,outer IP, connect to the website which is established on 172.16.1.5 with IP x.x.x.x, but I can't use machine with IP 172.16.1.5 to connect to it's own website.
I turned off the firewall on 172.16.1.5, and it's able to connect to internet such as yahoo or amazon. But it just can't use x.x.x.x to connect to it's own website.
I tested other guest OS which are gained 172.16.x.x also not able to connect to x.x.x.x.
How can I do to make guest OS connect it's redirected physical address?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来这是由称为“发夹”的 NAT 问题引起的。解释如下:
让局域网中的机器 A 有一个私有 IP 地址 192.168.0.10。
让 NAT N 将 A 的私有 IP 转换为 WAN 的公共 IP 77.33.45.67。
一些“早期/旧的”NAT 理所当然地认为转换后的地址只能从 WAN 中使用。因此,它们不会在 LAN 上转发 IP 地址 = 77.33.45.67 的数据包,只允许来自 WAN 的具有该 IP 地址的数据包进入并转发。
这个问题在最新的 NAT 中得到了解决,它可以检测这些情况并正确转发数据包。这个问题在P2P系统中有时会遇到。
如果幸运的话,您的 NAT 可能会被重新配置以允许在 LAN 上使用转换后的地址。如果没有,那么您需要一个新的 NAT。
It look likes this is caused by a NAT issue called 'hairpin'. Here is the explanation:
Let machine A on a LAN have a private IP address 192.168.0.10.
Let NAT N translate A's private IP to public 77.33.45.67 for the WAN.
Some 'early/old' NATs take for granted that the translated address in only going to be used from the WAN. Therefore, they don't forward packets on the LAN having ip address = 77.33.45.67 and only let in and forward those with this ip address when they come from the WAN.
This problem is solved in more recent NATs which detect these situations and forward packets properly. This problem is sometime encountered in P2P systems.
If you are lucky, your NAT be may be reconfigured to enable usage of translated address on the LAN. If not, then you need a new NAT.