Skip to content

Instantly share code, notes, and snippets.

@grimmo
Created May 12, 2023 13:44
Show Gist options
  • Save grimmo/9555a5e095de4f01b6ff844f22214bd7 to your computer and use it in GitHub Desktop.
Save grimmo/9555a5e095de4f01b6ff844f22214bd7 to your computer and use it in GitHub Desktop.
#ipset -q create fireh hash:net
rm firehol_level3.netset
wget https://iplists.firehol.org/files/firehol_level3.netset
my_file=$(cat firehol_level3.netset |grep -v "#")
ipset -q flush fireh
for row_data in $my_file; do
ipset add fireh ${row_data};
done
iptables -I INPUT -m set --match-set fireh src -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment