Created
May 16, 2025 15:10
-
-
Save Ast3risk-ops/f1420c4cbe3a92aca00428b47f102962 to your computer and use it in GitHub Desktop.
Simple script to block Censys's IPv4 scanning subnets in iptables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| iptables -A INPUT -s 162.142.125.0/24 -j DROP | |
| iptables -A INPUT -s 167.94.138.0/24 -j DROP | |
| iptables -A INPUT -s 167.94.145.0/24 -j DROP | |
| iptables -A INPUT -s 167.94.146.0/24 -j DROP | |
| iptables -A INPUT -s 167.248.133.0/24 -j DROP | |
| iptables -A INPUT -s 199.45.154.0/24 -j DROP | |
| iptables -A INPUT -s 199.45.155.0/24 -j DROP | |
| iptables -A INPUT -s 206.168.34.0/24 -j DROP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # too lazy to bother with the rest of their IPs, this doesn't really work. | |
| iptables -A INPUT -s shodan.io -j DROP | |
| iptables -A INPUT -s 207.90.244.0/24 -j DROP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment