Skip to content

Instantly share code, notes, and snippets.

View kimthostrup's full-sized avatar

Kim Thostrup kimthostrup

View GitHub Profile
@kimthostrup
kimthostrup / delete_deny_rules.sh
Last active August 14, 2018 10:50
Delete all DENY rules from a UFW ruleset
sudo ufw status numbered | grep 'DENY IN' | awk -F] '{print $1}' | sed 's/\[\s*//' | tac | xargs -n 1 bash -c 'yes|sudo ufw delete $0
@kimthostrup
kimthostrup / get-blocklist.sh
Created December 19, 2018 20:29
Ugly hack to download a couple of blocklist and use them in postfix
#!/bin/bash
# Go to our working directory
cd /tmp
# Download Blacklist
wget https://lists.blocklist.de/lists/all.txt --no-check-certificate
wget http://opendbl.net/lists/talos.list
# List cleaning