0

I have a CentOS 6.5 server running at a remote location that I access using SSH through port forwarding on a router.

Everything was working fine until today when I found I can no longer access the internet from the server.

I can still remote SSH into it and it still has it's static IP address, gateway etc I just can't use the internet.

If I use the servers Ethernet cable in a different computer that one can access the internet fine

But if I try ping I instantly get the error

# ping google.com
# ping: unknown host google.com

Does anyone have any steps to recommend towards figuring out why?

**

Content of file /etc/resolv.conf:

; generated by /sbin/dhclient-script
search DOMAINNAME.LOCAL domainname.local
nameserver 192.168.2.9
nameserver 192.168.2.16

Content of file /etc/sysconfig/network-scripts/ifcfg-eth1:

DEVICE="eth1"
BOOTPROTO="static"
HWADDR="34:40:B5:89:85:BE"
IPADDR=192.168.2.45
NETMASK=255.255.255.0
GATEWAY=192.168.2.254
DNS1=192.168.2.9
DNS2=192.168.2.16
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="bde2561c-9882-4e50-9e3a-22e44f6a5005"

Result of nslookup google.com 192.168.2.9

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

Result of nslookup google.com 192.168.2.16

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

Result of nslookup google.com 8.8.8.8

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

Result of nslookup google.com 8.8.4.4

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

Result of netstat -rn

197.81.19.48    0.0.0.0         255.255.255.248 U         0 0          0 eth0
10.254.254.0    0.0.0.0         255.255.255.0   U         0 0          0 as0t0
192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
169.254.95.0    0.0.0.0         255.255.255.0   U         0 0          0 usb0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
0.0.0.0         192.168.2.254   0.0.0.0         UG        0 0          0 eth1
7
  • Somehow name resolving fails on your server. Verify the name servers configured in /etc/resolv.conf.
    – Lambert
    Commented Jul 12, 2016 at 8:51
  • I've added the resolv.conf contents to my question, I also have DNS settings in my network script which I will add as well Commented Jul 12, 2016 at 8:55
  • what happens when you try nslookup google.com 192.168.2.9, and nslookup google.com 8.8.8.8? Maybe a firewall prevents you from using the nameservers configured, or they can not be reached, or the nameservers have been changed and the other computer is getting different nameservers from DHCP.
    – Lambert
    Commented Jul 12, 2016 at 9:06
  • I will add the output of the nslookup to the question Commented Jul 12, 2016 at 9:21
  • Have you tried the nslookup google.com 8.8.8.8 variant? And did you compare the name server configuration between the two hosts?
    – Lambert
    Commented Jul 12, 2016 at 9:53

1 Answer 1

1

What does your host routing table look like on the Server?

netstat -rn

It sounds like you have a local host based routing issue. The port forwarding for SSH still works because that has a local connection to your server.

1
  • Hello, I will add the output to the Question Commented Jul 13, 2016 at 6:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .