我在virtualbox中让CentOS 6.5在本地运行。我把它设好了,一切都很顺利。周末后我回来了,我注意到电脑被冻结了,所以我不得不重新启动。现在,我无法远程访问虚拟CentOS安装。我不能ssh,ftp,或查看任何我正在开发的网站。我可以通过virtualbox很好地登录到它。我似乎也无法从CentOS内部访问任何外部站点。基本上,我只能从vm登录到服务器,就这样.
我想复制和粘贴我的文件的结果,但我不能在这里,因为我没有GUI,它将不允许我从命令行复制。所以我会尽我所能写出这个..。
ping google.comping google.com
ping: unknown host google.comping jpCentos.ocean.local (主机名)64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.058 msping 8.8.8.8ping 8.8.8.8
From 10.1.1.158 icmp_seq=1 Destination Host Unreachabledig google.com; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 <<>> google.com
;; global options: +cmd
;; connection timed out; no servers could be reachedresolve.confsearch ocean.local
nameserver 10.1.1.19/etc/sysconfig/networkNETWORKING=yes
HOSTNAME=jpCentos.ocean.local
GATEWAY=10.1.1.3/etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0
TYPE=Ethernet
UUID=4c88f74e-57ca-465b-a0dd-78e12ff6e591
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
HARDWARE=08:00:27:8C:xx:xx
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPADDR=10.1.1.158
NETMASK=255.255.254.0
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"iptables -LChain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:mysql
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:10040
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination我试过禁用iptable和csf,但问题仍然存在。
route -nDestination Gateway Genmask Flags Metric Ref Use Iface
10.1.0.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
0.0.0.0 10.1.1.3 0.0.0.0 UG 0 0 0 eth0nslookup google.com;; connection timed out; trying next origin
;; connection timed out; no servers could be reachednslookup 8.8.8.8;; connection timed out; trying next origin
;; connection timed out; no servers could be reacheddig ns.google.com @8.8.8.8;; connection timed out; trying next origin
;; connection timed out; no servers could be reachedifconfig eth0eth0 Link encap:Ethernet HWaddr 08:00:27:8C:xx:xx
inet addr:10.1.1.158 Bcast:10.1.1.255 Mask:255.255.254.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)Connection-specific DNS Suffix:
Description: Realtek PCIe GBE Family Controller
Physical Address: 8C-89-A5-C8-xx-xx
DHCP Enabled: No
IPv4 Address: 10.1.0.235
IPv4 Subnet Mask: 255.255.254.0
IPv4 Default Gateway: 10.1.1.3
IPv4 DNS Server: 10.1.1.19
IPv4 WINS Server: 10.1.1.19
NetBIOS over Tcpip Enabled: Yes
Link-local IPv6 Address: fe80::2ce5:c9e5:6bdb:d536%12
IPv6 Default Gateway:
IPv6 DNS Server: 如果你还需要什么来帮助隔离这件事,请告诉我。我验证了网络设置是否为我们的网络正确设置,但是我看到了一些我不确定的变量(对等变量)。
发布于 2014-07-22 18:48:02
你提供了很多信息。不幸的是,这不是正确的信息。
ifconfig eth0,并确保您看到了“运行中的广播”ping 10.1.1.3ping 10.1.1.150或其他活动主机。ping 10.1.1.19。nslookup,在nslookup提示符下输入server 10.1.1.19,然后按Enter,然后键入yahoo.commtr上执行yahoo.com并分析输出发布于 2014-08-14 15:29:42
从IP的角度看,您似乎正在虚拟盒中的NAt中运行您的VM。
备份您的ifcfg-eth0文件,并将其保存在安全的位置。现在用以下内容编辑原始文件。
DEVICE=eth0
TYPE=Ethernet
UUID=4c88f74e-57ca-465b-a0dd-78e12ff6e591
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
HARDWARE=08:00:27:8C:xx:xx
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"保存它并尝试重新启动网络sudo service network restart
它应该解决这个问题。
https://serverfault.com/questions/614609
复制相似问题