This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "digitalocean_droplet" "haproxy-www" { | |
image = "ubuntu-14-04-x64" | |
name = "haproxy-www" | |
region = "nyc2" | |
size = "512mb" | |
private_networking = true | |
ssh_keys = [ | |
"${var.ssh_fingerprint}" | |
] | |
connection { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ------------------------------------------------------------------ | |
# Author: Ryan C Koch - ryanckoch@gmail.com | |
# Purpose: CHECK TCP AND UDP CONNECTIVITY BETWEEN | |
# SOURCE AND DESTINATION HOSTS | |
# ------------------------------------------------------------------ | |
SOURCE_FILE="source.hosts" | |
DESTINATION_FILE="destination.hosts" | |
LOG_VERBOSE="logs/verbose.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP request limiting =================================================================================================================== | |
frontend ft_web | |
# Use General Purpose Couter (gpc) 0 in SC1 as a global abuse counter | |
# Monitors the number of request sent by an IP over a period of 10 seconds | |
stick-table type ip size 1m expire 10s store gpc0,http_req_rate(10s) | |
tcp-request connection track-sc1 src | |
# refuses a new connection from an abuser | |
tcp-request content reject if { src_get_gpc0 gt 0 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo | |
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode | |
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes | |
14:32:33.525122 IP 127.0.0.1.49777 > 127.0.0.1.9200: Flags [P.], seq 313752908:313753888, ack 2465010394, win 257, options [nop,nop,TS val 2684167067 ecr 2684167066], length 980 | |
E...^.@.@............q#...}L............... | |
..#...#.GET /index/_search HTTP/1.1 | |
Host: 127.0.0.1:9200 | |
Accept: */* | |
Content-Length: 845 | |
Content-Type: application/x-www-form-urlencoded |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Easy Mac | |
Copyright (2015) Sean Beck | |
Licensed under Creative Commons Attribution-ShareAlike 4.0 International | |
See: https://creativecommons.org/licenses/by-sa/4.0/ | |
Easily change your MAC address on Linux using `ifconfig` | |
''' | |
#!/usr/bin/python2.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Test parallel scripts running with asyncio executors. | |
Requires at least Python 3.4 to run. | |
""" | |
import asyncio | |
import os |
OlderNewer