I want to add some rules to my iptables to prevent port scanning, how can I do this?
I find some solution but it's not efficient.
I want to add some rules to my iptables to prevent port scanning, how can I do this?
I find some solution but it's not efficient.
The best bet is having a default drop policy in iptables and then only allowing what's required. Something like:
It won't stop people from doing portscans, but it will mean that all they'll see is port 80 open.
For nmap port scanning, you can check the following answer: iptables Tips & Tricks
I'm not familiar with Hping, but if Hping uses NULLflags, the answer I've linked above should also work.