Skip to content

Instantly share code, notes, and snippets.

@tkuennen
Created May 25, 2016 21:36
Show Gist options
  • Save tkuennen/41d2e9e694fea83324d8f586f903145b to your computer and use it in GitHub Desktop.
Save tkuennen/41d2e9e694fea83324d8f586f903145b to your computer and use it in GitHub Desktop.
# http://iplists.firehol.org/
yum -y install zlib1g-dev gcc make git autoconf autogen automake pkg-config curl ipset
cd /tmp
# Download iprange and firehol from github
git clone https://github.com/firehol/iprange.git iprange.git
git clone https://github.com/firehol/firehol.git firehol.git
# Install iprange
cd iprange.git
./autogen.sh
# Make sure it completed successfully
./configure --prefix=/usr CFLAGS="-march=native -O3" --disable-man
# Make sure it completed successfully
make
# Make sure it completed successfully
sudo make install
# Make sure it completed successfully
# Install firehol
cd ../firehol.git
./autogen.sh
# Make sure it completed successfully
./configure --prefix=/usr --sysconfdir=/etc --disable-man --disable-doc
# Make sure it completed successfully
make
# Make sure it completed successfully
sudo make install
# Make sure it completed successfully
# enable an ip list
update-ipsets enable dshield spamhaus_drop spamhaus_edrop malwaredomainlist zeus zeus_badips atlas_attacks tor_exits bogons fullbogons
# All the lists
#update-ipsets --enable-all
# update all enabled lists
update-ipsets
#Enable cron job
# Update every 9 minutes
#*/9 * * * * root update-ipsets >/dev/null 2>&1
# Update once a day
echo 'update-ipsets >/dev/null 2>&1' >> /etc/cron.daily/update-ipsets.cron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment