I have recently bought a VPS with CentOS 6.5 and DirectAdmin already installed on it. Knowing that I need to configure the firewall and security tools, I have already studied some basic tutorials about Linux's famous firewall, that is, Iptables and have added some lines to it according to the material I have read. I have also installed and configure the fail2ban. Now, I wanted to ask if my Iptables configuration is correct or I need to make any other changes. Please be kind enough to let me know if I have to make any corrections.
Many thanks
Here's the output of iptable --list
Chain INPUT (policy DROP)
target prot opt source destination
fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,PSH,ACK,URG/NONE
DROP tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN state NEW
DROP tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,SYN,RST,PSH,ACK,URG
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:urd
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s
ACCEPT tcp -- anywhere anywhere tcp dpt:imap
ACCEPT tcp -- anywhere anywhere tcp dpt:imaps
ACCEPT tcp -- anywhere anywhere tcp dpt:54736
ACCEPT tcp -- anywhere anywhere tcp dpt:EtherNet/IP-1
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:ftp-data:65535 ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state ESTABLISHED
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp spt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:ftp-data:65535 ctstate NEW,ESTABLISHED
Chain fail2ban-SSH (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere