2

I have CentOS 6.5 running locally in virtualbox. I set it up and everything was working perfectly. I came back after the weekend and I noticed the computer was frozen so I had to do a hard restart. Now I am no longer able to access my virtual CentOS install remotely. I cannot ssh, ftp, or view any website I am developing on it. I am able to log into it just fine VIA virtualbox. I also don't seem to have any access to external sites from within CentOS. Basically, I can only log into the server from the vm and that's it...

I'd like to copy and paste the results of my files but I am not able to at this point as I have no GUI and it won't allow me to copy from command line. So I will write out this as best I can...

command: ping google.com

ping google.com 
ping: unknown host google.com

command: ping jpCentos.ocean.local (hostname)

64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.058 ms

command: ping 8.8.8.8

ping 8.8.8.8
From 10.1.1.158 icmp_seq=1 Destination Host Unreachable

command: dig 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 reached

contents of: resolve.conf

search ocean.local
nameserver 10.1.1.19

contents of: /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=jpCentos.ocean.local
GATEWAY=10.1.1.3

contents of: /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=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"

command: iptables -L

Chain 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

I've tried disabling iptables and csf but the issue still persists.

command: route -n

Destination    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     eth0

command: nslookup google.com

;; connection timed out; trying next origin
;; connection timed out; no servers could be reached

command: nslookup 8.8.8.8

;; connection timed out; trying next origin
;; connection timed out; no servers could be reached

command: dig ns.google.com @8.8.8.8

;; connection timed out; trying next origin
;; connection timed out; no servers could be reached

command: ifconfig eth0

eth0      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)

Window7 Network Details: (ocean.local is our network)

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: 

Let me know if you need anything else to help isolate this. I verified the network settings are setup properly for our network but I see some variables I am unsure of (PEER variables).

Jeremy
  • 152
  • 1
  • 9

2 Answers2

2

You provided a lot of info. Unfortunately it's not the right kind of info.

  1. First make sure the link is up: ifconfig eth0 and make sure you see "UP RUNNING BROADCAST"
  2. Then make sure you can ping the gateway: ping 10.1.1.3
  3. Then make sure you can ping another host on the same subnet: ping 10.1.1.150 or some other active host
  4. then make sure you can ping your dns server: ping 10.1.1.19
  5. Then make sure your DNS server is actually working: launch nslookup and at the nslookup prompt type server 10.1.1.19, then press Enter, then type yahoo.com
  6. then do an mtr on yahoo.com and analyze the output
Michael Martinez
  • 2,645
  • 3
  • 24
  • 35
0

Looking at the IP it seems that you are running your VM in NAt inside Virtual-box

Make a backup of your ifcfg-eth0 file and keep it some where safely. now edit the original file with following content.

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"

save it and try restarting network sudo service network restart

It should fix the issue.

kasperd
  • 30,455
  • 17
  • 76
  • 124