Welcome ,,,,

prevent nmap form scanning ports of server is Very useful to prevent hackers form scanning your server

first : login into SSh with Root

and do that command

PHP Code:
iptables -A INPUT -p tcp --tcp-flags ALL FIN -j DROP
iptables 
-A INPUT -p tcp --tcp-flags ALL NONE -j DROP
iptables 
-A INPUT -p tcp --tcp-flags ALL ALL -j DROP
iptables 
-A INPUT -p tcp --tcp-flags ALL FIN,PSH,URG -j DROP 

finished .......

try now to scanning your ports of server you can't


Note : csf prevent anyone from scanning ports

best wishes ,,,,

Hossam