New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Centos 6.4 "ping : unknown host google.com"
kucingbelang4
Member
in Help
Help me, i am newbie in server. I have server with centos 6.4 , lo and eth0 is already up. but it cannot ping to google . setting /etc/resolv.conf nameserver 127.0.0.1 .
please help me. thx before
Comments
fix your dns server
Change 127.0.0.1 to 8.8.8.8 (public dns by Google)
Add the following to resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
now my /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 , still cannot ping google.com it said "ping: unknown host google.com"
i tried to pinging itself and return "Destination Host Prohibited". what is that??
Is it connected to internet ? Pleease test ping to 8.8.4.4 and 8.8.8.8, what is the result?
Try restarting your server.
Are u Indonesian ?
yes , when i tried to ping 8.8.4.4 and 8.8.8.8 the result was return nothing (i forced to stop ctrl + z)
It seems you should fix the gateway until your box connected to internet.
^Z doesn't stop it, it moves it to the background (resume using the 'fg' command)
Use ^C instead (^ = control of course)
gateway?? am using 192.168.19.1 , and the webserver 192.168.19.20 . can i assign etc/resolv.conf with 192.168.19.1 ??
yess , sory for my bad english
Please do tracert 8.8.4.4
am done with restart the server, and still return "
ping: unknown host google.com"
am traceroute 8.8.4.4 and return "
traceroute to 8.8.4.4 (8.8.4.4), 30 hops max, 60 byte packets
1 192.168.19.1 (192.168.19.1) 0.291 ms 0.461 ms 0.299 ms
1 192.168.19.1 (192.168.19.1) 0.291 ms 0.461 ms 0.299 ms
1 192.168.19.1 (192.168.19.1) 0.291 ms 0.461 ms 0.299 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
",
what is that mean??
i stop it forced because get more than 3 minutes to respond. its timeout right?
Ping on linux will keep pinging (or at least attempting) until you kill it or when you specify an amount of pings it should emit (-c flag)
To see if it's still running, try:
To get rid of them the easy way is:
Although one could argue this is a cleaner method in general:
If it's a default install, eth0 isn't setup by default. Even by running
ifconfig eth0 up
, you'll still have issues. The CentOS FAQ has more info.am using minimal install centos 6.4 final
when i use killall ping, it return "ping: no process killed"
Is NetworkManager running ? Disabling it might help.
@Frost - pls don't hijack this thread with your fancy commands.
To be sure wether you have internet at all, does your internet work correctly?
route -n
when i try route -n , it return "
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.19.0 0.0.0.0 255.255.255.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 192.168.19.1 0.0.0.0 UG 0 0 0 eth0
".
whats that mean?
why should i disabling it off?
What kind of VPS is this? KVM/OpenVZ?
Are gateways setup properly? Are you using DHCP or manually configuring the network? If you try pinging an ip directly (8.8.8.8) do you get a response?
To me it sounds like a gateway issue.
is this a virtualbox or vmware?
try to change the network adapter
Seems like just a local office computer?
IP address 192.168.19.20, gateway 192.168.19.1. Please check if there are other windows computer with same network / gateway which can connect to internet. Your LAN router might not passing any traffic at all.
My other suspicion is this (since you tell about prohibited packet): Would you mind to tell the output of
iptables -L -n -v
You can also always try to do
service iptables stop
then
ping 8.8.8.8
does it works?
If it's working, just edit /etc/resolv.conf to
nameserver 8.8.8.8
nameserver 8.8.4.4
And it should be able to resolve hostname now.
Let's start with basics. Run
to show the state of network interfaces. Is eth0/whatever it's called up?
will show firewall status.
shows current resolver state (what NS records are available). Note that under normal circumstances you don't have to correct /etc/resolv.conf manually.
Unless network interface is up and tuned correctly, no external connectivity would occur.
Advice: when posting file contents/program outputs, add four spaces in front of every line, in order the output was just as programs output them, not concatenated to a single line.