My Server OS: Centos 6.3 x64.The server iptables is:*filter:INPUT DROP [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT COMMITBut I get neither a response issuingping www.google.comORcurl -I http://www.google.comfrom the server. Both receive no response!How to modify my iptables rules? 
My Centos Server cannot resolve the DNS host name
centos;iptables;dns
You didn't give many details about your network setup, but assuming that the iptables configuration is on host A and you tried to ping from host B, then here's the answer.You configured iptables to allow TCP ports 22 and 80. All other traffic is blocked because iptables interprets the configuration from the top and you have :INPUT DROP [0:0]set.ICMP is a different protocol, and you have to explicitly allow it in order to be able to ping the machine:iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -d YOUR_IP -m state --state NEW,ESTABLISHED,RELATED -j ACCEPTEDIT: your edit in the original question showed that you are trying to access hosts from the host you've configured iptables. So you have to tell iptables to accept packets that are part of an existing connection:iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT