Skip to content

Instantly share code, notes, and snippets.

@jeffgeiger
jeffgeiger / update_blacklist.sh
Created October 15, 2014 13:30
Update IPTables with IP's from OpenBL
#!/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}")
@jc00ke
jc00ke / gist:372111
Created April 20, 2010 06:05 — forked from ELLIOTTCABLE/gist:372110
ext4 tweaks
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 "/" »