Hi, in this post i share with you a small script (Shodban) that will allow you to block Shodan scanners on your personal Linux server.
If you have your public IP address exposed to the world, surely Shodan has already scanned your server for open ports and versions.
As you can see in the following screenshot this is the information associated to this website in the Shodan search engine.
The script is mainly based on collecting the known IP addresses of Shodan that can be found in this IPFire web site: https://wiki.ipfire.org/configuration/firewall/blockshodan
Once the IP addresses have been collected, a block is applied to each of them so that the server blocks incoming requests from Shodan.
The Shodban script is as follows:
Once executed you will see after a few hours that the Shodan search engine will not find information about your server, displaying the message: No results found.
I hope it is as useful to you as it is to me
Greetings.