SSH和ping在VM之间工作,telnet和curl不工作



我有VMWare Fusion与两个运行CentOS 6.7的虚拟机,我试图在他们(服务器&工作站)。两个虚拟机之间的Ping和ssh工作正常,但当我去knife client list时,它说它找不到到主机的路由。Curl和telnet也不起作用。一些信息:VMWare Fusion在OS X Yosemite上运行,防火墙关闭,两个虚拟机的网络设置都是"与我的Mac共享"。服务器上的nestat -puntal | grep nginx生成:

tcp        0      0 0.0.0.0:9680                0.0.0.0:*                   LISTEN      1091/nginx
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      1091/nginx
tcp        0      0 0.0.0.0:9683                0.0.0.0:*                   LISTEN      1091/nginx
tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      1091/nginx

ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:0C:29:5A:9E:EE
          inet addr:172.16.20.131  Bcast:172.16.20.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe5a:9eee/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:231 errors:0 dropped:0 overruns:0 frame:0
          TX packets:114 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29039 (28.3 KiB)  TX bytes:14305 (13.9 KiB)

错误:

[root@chefworkstation ~]# knife client list
ERROR: Errno::EHOSTUNREACH: No route to host - connect(2) for "chefsrv1" port 443
[root@chefworkstation ~]# curl chefsrv1
curl: (7) couldn't connect to host
[root@chefworkstation ~]# ping chefsrv1
PING chefsrv1.localdomain (172.16.20.131) 56(84) bytes of data.
64 bytes from 172.16.20.131: icmp_seq=1 ttl=64 time=0.685 ms
64 bytes from 172.16.20.131: icmp_seq=2 ttl=64 time=0.335 ms
64 bytes from 172.16.20.131: icmp_seq=3 ttl=64 time=0.319 ms

一种暴力解决方案,但我禁用了iptable_filter模块并禁用了selinux。现在工作。

最新更新