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 | |
# 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 | |
# |
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 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] }] |