Skip to content

Instantly share code, notes, and snippets.

@KiNgMaR
KiNgMaR / cloudflare-ipset.sh
Last active January 22, 2024 17:28
Cloudflare IPTABLES and IPSET scripts - fixed 2022-02-23
#!/bin/bash
# name of the ipset - v4 or v6 will be appended.
IPSET_NAME=cloudflare-
# argument: v4 or v6 (defaults to v4)
cloudflare_ipset ()
{
local ipv
local inetv
@sethkinast
sethkinast / gist:5914577
Last active December 19, 2015 06:49
Tiny script to grab Tor exitnodes and ban them via CloudFlare's API
#!/bin/bash
SERVERS=(108.162.196.125 108.162.197.125)
for server in ${SERVERS[*]}
do
echo "Now processing $server"
wget --timeout=10 -t1 -O tor.txt https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$server
for ip in `tail -n +4 tor.txt`
@jirutka
jirutka / rules-both.iptables
Created September 18, 2012 12:42
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mdigital
mdigital / tarsnap-install.sh
Created April 18, 2012 02:40
Debian / Ubuntu Tarsnap installation
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#