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/perl | |
# Looks at the output of ps to determine how many pppd children are running, | |
# each of which corresponds to an active connection. Assumes use of pppd | |
# as the authenticating agent for the vpn. | |
my $cmd = 'ps auxwww'; | |
open (my $in, "$cmd |") or die "Couldn't execute command '$cmd'"; |
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/python | |
# aws-instance-monitor | |
# | |
# This is a command-line tool, as well as a monitor/failover script that is designed | |
# for HA NAT, but should be usable when the following conditions are met: | |
# | |
# 1. Used in AWS VPC Route Table - VPC routing describes methods of egress | |
# for outbound traffic. Typically, a NAT will have a 0.0.0.0/0 rule | |
# and the route will be in a table associated with a Private Subnet. |
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
# This script configures a linux box as a NAT router (PAT), suitable for use | |
# for AWS instances in a VPC Private Subnet to communicate with the Internet | |
# | |
# To setup a NAT: | |
# # Create an AWS instance in Public Subnet | |
# # Disable src./dest. check (networking menu in UI) | |
# | |
# To install, login to instance: | |
# sudo su - | |
# curl http://gist.github.com/.../raw/... | bash -s |
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
#### Pulls Nodejs Source, Builds and Installs | |
# | |
# I've run this successfully on an AWS EC2 instance running a RHEL AMI. It | |
# should work fine for installs on recent RHEL descended distros. | |
# | |
# Installation is done by pulling this script from curl, and piping it | |
# through bash, with appropriate parameters. This must be run as root, | |
# and local files (e.g. temp files) will be created relative to the | |
# current working directory. | |
# |
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/sh | |
# | |
# Shell script for installation and setup of L2TP/IPsec VPN tunnel in site-to-site | |
# mode (e.g. connecting two inter-regional VPCs). VPN software is libreswan. | |
# | |
# This should work on linux systems that are RHEL based. | |
# | |
# To install directly from this gist, you can curl the "raw" version and pipe that to | |
# "bash -s" while also defining the environment variables: | |
# |
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/sh | |
# | |
# Shell script for installation and setup of L2TP/IPsec VPN tunnel in remote access | |
# mode. Remote access mode allaows individual users to login using username/password | |
# and be allocated IP on the private network. Uses shared secret (PSK) and username/password | |
# in file (ppp chap-secret) for authentication. VPN software is libreswan + xl2tpd + pppd. | |
# | |
# This should work on linux systems that are RHEL based. | |
# | |
# To install directly from this gist, you can curl the "raw" version and pipe that to |
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
#### Installs Nodejs and Express on a new AWS EC2 instance, running Linux AMI. | |
# "Webserver" is about 10 lines of code in Express.js/Node | |
# This works on RHEL systems (i.e. yum). | |
# To install, do this on target machine (make sure to get the link from RAW gist): | |
# | |
# $ sudo su - | |
# $ curl https://gist...../raw/... | bash -s | |
#### Step 1: Note OS | |
# Installing Nodejs depends on which OS you're on. Since I was on a AWS AMI |
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
# Shell commands to interactively install wordpress on Debian Wheezy | |
# This is not an automatic script (but could be easily converted). Assumes you have root. | |
# Assumes you have Apache2, PHP and MySQL already installed. | |
# @see https://gist.github.com/rogerbush8/db4266946b4a02e967ed - rogerbush8/install-debian-wheezy-apache2-php-mysql | |
# which could be performed as a prerequisite. | |
# Pull latest tarball directly from wordpress.org and untar it to /var/www. | |
# All files will end up in /var/www/wordpress. | |
cd /tmp |
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
# Shell commands to interactively install Apache2 with PHP and MySQL support on Debian Wheezy | |
# This is not an automatic script (but could be easily converted). Assumes you have root. | |
# @see https://gist.github.com/rogerbush8/945baf7a3f1a9ae99ab1 - rogerbush8/install-debian-wheezy-mariadb-10 | |
# which could be performed as a prerequisite for simple client/server install. | |
# Update | |
apt-get update | |
apt-get upgrade --show-upgraded |
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
# Shell commands to interactively install MariaDB 10.0 on Debian Wheezy | |
# This is not an automatic script (but could be easily converted). Assumes you have root. | |
# Update | |
apt-get update | |
apt-get upgrade | |
# Add MariaDB repo and key for Debian Wheezy MariaDB 10.0 (SF mirror) | |