Skip to content

Instantly share code, notes, and snippets.

View wmhaynes's full-sized avatar

William Haynes wmhaynes

View GitHub Profile
@wmhaynes
wmhaynes / engenius-eap600-enable-ssh.md
Created June 6, 2016 18:59 — forked from darconeous/engenius-eap600-enable-ssh.md
Enabling SSH on Engenius EAP600

Enabling SSH on Engenius EAP600

This tutorial will walk you through the steps needed to get root SSH access on an [Engenius EAP600][1] dual-band WiFi access point. SSH doesn't come enabled out of the box on these things, so if you want to SSH into the device (which is running an old version of OpenWRT), keep reading.

![Picture of EAP600][2]

@wmhaynes
wmhaynes / OpenVPN_Building_Script.sh
Last active April 7, 2016 21:25
Builds OpenVPN Client Files Automagically
#! /bin/bash
# Script to automate creating new OpenVPN clients
# Built off of H Cooper script of 5/2/11 at https://gist.github.com/hcooper/814247
# William Haynes - Sabai Technology
OPENVPN_RSA_DIR=/etc/openvpn/easy-rsa
OPENVPN_KEYS=$OPENVPN_RSA_DIR/keys
echo $OPENVPN_RSA_DIR
KEY_DOWNLOAD_PATH="/etc/openvpn/clients"
#Make sure that download path exists
if [ ! -d "$KEY_DOWNLOAD_PATH" ]; then
@wmhaynes
wmhaynes / vpnroute.sh
Created September 16, 2014 15:13
Line that allows snat of all traffic through the openvpn tunnel
/usr/sbin/iptables -t nat -A POSTROUTING -o tun+ -j SNAT --to-source $(ifconfig tun0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}')
@wmhaynes
wmhaynes / ethernet_setup.sh
Created August 7, 2014 18:30
set wan and lan ports on initial x86 openwrt boot
#!/bin/sh
interfaces=$(ip link show | grep ": eth" | cut -d ':' -f2 | awk -F: '{print $0}' | awk '{print $1}');
for x in $interfaces; do
echo $x > /tmp/wan;
echo $interfaces > /tmp/ports;
sed -i "s/$x //g" /tmp/ports;
uci set network.wan.ifname="$(cat /tmp/wan)";
uci set network.lan.ifname="$(cat /tmp/ports)";
break;
done
@wmhaynes
wmhaynes / Ports
Created August 7, 2014 17:13
Show ethernet ports available on a linux device
ip link show | grep ": eth" | cut -d ':' -f2 | awk -F: '{print $0}' | awk '{print $1}'