Centos 5.7 server can't connect to gateway and internet

Issues related to configuring your network

Centos 5.7 server can't connect to gateway and internet

Postby ericmachine » 2012/07/19 06:24:31

Hi everyone,

I really need your help. I am desperate and not able to solve this problem.

Posted help at elastix and freepbx and no one answered. Probably Centos is a better forum to ask this.

Looked at all centos documentation,forums and blogs. Can't figure out what's missing here.

I have 2 server boxes (brand new).

First I installed the elastix 2.3 distro 64 bit to the 1st server (followed exactly from the installation guide). All okay and managed to login. But I can't seem to ping to google.com or even my gateway 192.168.1.1. I thought probably my network card had issue.

note: elastix 2.3 comes with centos 5.7

Then I tested the same on the 2nd server box, same problem happens.

In order to verify this, I installed HylaFax distro (got this working on other machine) on the same boxes above. It works, I can't access to the hylafax installation website and also within it I can ping to any sites.

I need to setup IP address for this one (no DHCP here).

My settings as follows:-

/etc/resolv.conf

search local
nameserver 8.8.8.8
nameserver 8.8.4.4 (tried opendns & unifi dns, makes no difference too)

route -n
192.168.1.0 | 0.0.0.0 ...
169.254.0.0 | 0.0.0.0 ...
0.0.0.0 | 192.168.1.1 (added this via route add default gw 192.168.1.1)

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=some-random-alphanumerics
IPADDR=192.168.1.5 (tried different IP too)
NETMASK=255.255.255.0
ONBOOT=yes (tried no too)
BOOTPROTO=none (tried static too)
GATEWAY=192.168.1.1 (removed this makes no difference)
TYPE=Ethernet
NM_CONTROLLED=yes (test no or remove too)

Note: i tried few type of settings, don't make any differences too

/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=freepbx

/etc/hosts
127.0.0.1 localhost freepbx localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
127.0.1.1 freepbx (copied similar to hylafax installation which work, but no differences)

ping google.com
- ping: unknown host google.com

ping 8.8.8.8
... Destination Host Unreachable

ping 192.168.1.1
... Destination Host Unreachable

ping 127.0.0.1 (works here)

ping 192.168.1.5 (works, same IP with server)

at the same time, i flushed IPtables or stop the service makes no differences too.

Note: I tried other flavors like freepbx distro and not getting it to work either. Just why is HylaFax distro working? If not mistaken, it's using Centos 5.8 probably not too far away from freepbx centos distro.

Anyone mind to help? Thanks so much.
ericmachine
 
Posts: 5
Joined: 2012/07/19 06:22:10


Centos 5.7 server can't connect to gateway and internet

Postby pschaff » 2012/07/20 17:54:42

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Please do not use images when text would be much better. What you have posted is quite confusing. How have you tried to configure the networks? By hand or with system-config-network? If the latter, the GUI or text version? Please provide more information about your system by running "./getinfo.sh" (using sneakernet as required) and showing us the output file.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America


Return to CentOS 5 - Networking Support

Who is online

Users browsing this forum: No registered users and 2 guests