无法连接到远程的centos 7从至less一台主机安装

编辑:

看起来这个问题在离开了所有的东西24个小时之后神奇地消失了。 在坐下来进一步研究之后,我注意到我的网站加载了。

如果不是现有的回应,我会删除这个问题。


我有一台运行在HyperV上的虚拟机,几天前运行得非常好,但突然拒绝让我从主机操作系统连接到它,但是我可以很好地连接到其他虚拟机和networking上的其他物理机器。

它会对ping做出响应,但是任何尝试SSH或访问其httpd服务器的结果都会导致“连接被拒绝”。

iptables和selinux都在机器上禁用。

这里是在所讨论的VM上的ip addr的输出,以及主机OS的ip信息:

视窗

 Ethernet adapter vEthernet (Public): Connection-specific DNS Suffix . : <hidden> Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter Physical Address. . . . . . . . . : 40-16-7E-A8-B7-39 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::35ea:cf60:b4e3:c15%18(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.2.150(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : Sunday, February 28, 2016 8:14:24 PM Lease Expires . . . . . . . . . . : Monday, March 07, 2016 8:14:22 PM Default Gateway . . . . . . . . . : 192.168.2.1 DHCP Server . . . . . . . . . . . : 192.168.2.6 DHCPv6 IAID . . . . . . . . . . . : 121640574 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-3B-94-11-40-16-7E-A8-B7-39 DNS Servers . . . . . . . . . . . : 192.168.2.6 192.168.2.10 NetBIOS over Tcpip. . . . . . . . : Enabled 

CentOS 7

 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:15:5d:02:96:0f brd ff:ff:ff:ff:ff:ff inet 192.168.2.16/24 brd 192.168.2.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::215:5dff:fe02:960f/64 scope link valid_lft forever preferred_lft forever 

Windows服务器

为了完整性,这里是我的域名服务器的IP细节,没有问题访问有问题的服务器。

 Ethernet adapter vEthernet (Intel(R) 82566DC Gigabit Network Connection - Virtual Switch): Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2 Physical Address. . . . . . . . . : 00-16-76-CA-1A-93 DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::8d04:b94b:beb3:d3bf%17(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.2.6(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.2.1 DHCPv6 IAID . . . . . . . . . . . : 301995638 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1C-E9-73-B5-00-16-76-CA-1A-93 DNS Servers . . . . . . . . . . . : ::1 127.0.0.1 NetBIOS over Tcpip. . . . . . . . : Enabled 

我该如何解决这个问题呢? 对我来说,这是毫无意义的。

你使用iptables而不是firewalld? 从CentOS7开始,它默认使用firewalld。

你可以通过发行来检查CentOS的firewalld条目;

 #firewall-cmd --list-all 

还有一些背景: http : //www.tecmint.com/configure-firewalld-in-centos-7/