Skip to content

Instantly share code, notes, and snippets.

Creating a dynamic site-to-site VPN with OpenSwan on Ubuntu 10.04 on EC2

Wes Winham winhamwr@gmail.com

There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.

@inthecloud247
inthecloud247 / saltstack-sudoers-config
Created January 15, 2013 23:16
salt sudoer config example
sudoer-amazing:
file.append:
- name: /etc/sudoers
- text:
- "ydavid ALL=(ALL) NOPASSWD: ALL"
sudoer-defaults:
file.append:
- name: /etc/sudoers
- text:
@inthecloud247
inthecloud247 / splunk-daemonset.yaml
Created April 12, 2018 16:57 — forked from FutureSharks/splunk-daemonset.yaml
Creates a Kubernetes DaemonSet that will monitor container logs and forward them to a Splunk Indexer
# Create using kubectl:
# $ kubectl create -f splunk-daemonset.yaml
#
# You should also add config on your indexer to deal with the json formatted files:
# https://answers.splunk.com/answers/148307/how-to-parse-and-extract-json-log-files-in-splunk.html
#
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: splunk-forwarder
HOST=localhost
PORT=9200
TO_NODE=YOUR_NODE_NAME
curl "http://$HOST:$PORT/_cat/shards" | grep UNAS | awk '{print $1,$2}' | while read var_index var_shard; do
curl -XPOST "http://$HOST:$PORT/_cluster/reroute" -d "
{
\"commands\" : [
{
\"allocate\" :
@inthecloud247
inthecloud247 / gist:e4f3843f00d3e206501128db3049ba20
Created November 21, 2017 08:34 — forked from ipedrazas/gist:e3ae3ddb98b2e85c8370
Consul.io KV get value from bash
curl -s 10.0.0.145:8500/v1/kv/my_key/my_otehr_key/this_is_the_key?dc=dc1 | jq -r '.[0].Value' | base64 --decode