Skip to content

Instantly share code, notes, and snippets.

@jeffgeiger
jeffgeiger / update_blacklist.sh
Created Oct 15, 2014
Update IPTables with IP's from OpenBL
View update_blacklist.sh
#!/bin/bash
CHAINLIST=$(/sbin/iptables -nL | grep 'Chain block-traffic-from-openbl' | cut -d\ -f 2)
if [ -z $CHAINLIST ]; then
/sbin/iptables -N block-traffic-from-openbl
/sbin/iptables -A INPUT -j block-traffic-from-openbl
fi
BLACKLIST=$(/usr/bin/curl -fs http://www.openbl.org/lists/base_7days.txt.gz | gunzip | egrep "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}")
View gist:372111
parted /dev/sda
> mklabel msdos
> mkpart primary ext2 0% 128MB
> mkpart primary linux-swap 128MB 2176MB
> mkpart primary ext2 2176MB 2688MB
> mkpart primary ext3 2688MB 100%
> set 1 boot on
mkfs.ext4 -b 4096 -E "lazy_itable_init=1" -G 128 -i 4096 -I 256 »
-L "Puzzles' Journal" -m "0.5" -M "/" »