This question is in a way related this and this
My question is about blocking incoming connections using iptables. I read different posts in unix.stackexchange.com and got a basic understanding of iptables. But I do not understand some particular points. Any help is appreciated.
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -P INPUT DROP
I wanna use this code. It has to block all incoming connections (all ports will be closed for an outsider) except the responses for requests sent by me. This was simple I thought.
will incoming ICMP ping requests be blocked by the above shown code ? If not, why?
if above shown code does not block ICMP ping requests, adding
iptables -I INPUT -j DROP -p icmp --icmp-type echo-requestwill block it?can port scans from a blocked ip can get information about my computer?
should I add specific rules like
-p tcp --tcp-flags FIN,SYN FIN,SYN -j DROPto block specific flood attacks or my first code handles it?