Stop IPTABLES (service iptables stop) and try again, then if working, add port 80 to IPTABLES (cmdline:# iptables -A INPUT -p tcp ---dport 80 --sport 1024:65535 -j ACCEPT) I think this is th... [by hansolo]
on 12/17/2010 – Made popular on 12/17/2010
i'd like to basically drop all packets, but still allow port 22, 80 and 52533. ATM this firewall doesn't allow pinging, or for me to use yum update. How can I add that? Thanks for advice. Also is there an easier way to open port 80?
I am running a server which needs UDP ports 1000:11000 opened, as well as TCP 10011 and 30033 open to function.
I have a set of iptables rules set to allow SSH and those ports, and intentionally left out 2010 as I am getting attacked on that port. The server does not block the incoming IP even when told to do so.
service iptables stop
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp -m multiport --dports 22,80,443 -m state --state NEW,ESTABLISHED -j ACCEPT
service iptables save
service iptables restart
works as expected on a Centos 6.3 server (provided by VPSBlocks.com.au) but