Skip to content

Instantly share code, notes, and snippets.

@dcarley
dcarley / vpnc-script-aws
Created November 8, 2017 11:44 — forked from alext/vpnc-script-aws
vpnc script to route all AWS IP ranges over VPN.
#!/bin/bash
# vpnc-script wrapper for use with openconnect that routes all AWS IP ranges over the VPN.
# Pass any additional IP ranges to be routed as args to the script.
#
# Requirements: bash, curl and jq.
#
# Example usage:
# openconnect https://vpn.example.com/profile --script '/path/to/vpnc-script-aws' --no-dtls
#
@dcarley
dcarley / gist:3811003
Created October 1, 2012 11:11 — forked from apsoto/gist:2869888
Diagram Showing EC2 Security Group Data Flows
#!/usr/bin/env ruby
require 'fog'
require 'graphviz'
ec2 = Fog::Compute.new(:provider => 'AWS')
graph = GraphViz::new("structs", "type" => "graph")
groups = ec2.security_groups
group_map = Hash[groups.collect { |g| [g.group_id, g.name] }]