Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -ex
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
# install ThinkUp on EC2 Ubuntu instance:
#
# @spara 12/23/10
# @waxpancake 1/3/11
# install required packages
sudo apt-get update
sudo apt-get -y install build-essential devscripts quilt nano
sudo apt-get -y build-dep openssl
apt-get source openssl
cd openssl-*
nano debian/rules # Remove no-ssl2 in args
dch -n 'Allow dangerous v2 protocol'
dpkg-source –commit
debuild -uc -us
sudo dpkg -i ../*ssl*.deb
@delfuego
delfuego / docker-block-enforcement.sh
Last active March 5, 2017 03:05 — forked from clems4ever/custom-chain-enforcement.service
docker-swarm iptables FORWARD custom chain enforcement
#!/bin/bash
CUSTOM_CHAIN=DOCKER-BLOCK
DELAY=10
NEW_RULE="-o docker0 -j ${CUSTOM_CHAIN}"
chain_exists()
{
[ $# -lt 1 -o $# -gt 2 ] && {
echo "Usage: chain_exists <chain_name> [table]" >&2