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
auto lo | |
iface lo inet loopback | |
iface eth0 inet manual | |
iface eth1 inet manual | |
iface bond0 inet manual | |
slaves eth0 eth1 | |
bond-mode balance-tlb |
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
from sh import mtr | |
i = mtr("google.com", _iter=True) | |
for x in i: | |
print(x) | |
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
FROM ubuntu:12.04 | |
RUN apt-get update | |
RUN apt-get install -y mtr-tiny iputils-ping python python-dev python-pip git build-essential | |
RUN pip install -r https://raw.github.com/nickpegg/lg/master/requirements.txt | |
RUN pip install uwsgi | |
ADD adduser.sh / | |
RUN /adduser.sh |
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
### Keybase proof | |
I hereby claim: | |
* I am nickpegg on github. | |
* I am nickpegg (https://keybase.io/nickpegg) on keybase. | |
* I have a public key whose fingerprint is 2E55 A600 8865 7536 DC27 1E32 E60D 07B6 08CB 13F3 | |
To claim this, I am signing this object: |
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
auto lo | |
iface lo inet loopback | |
# outside | |
allow-hotplug eth0 | |
iface eth0 inet dhcp | |
hwaddress ether AA:BB:CC:DD:EE:FF | |
dns-search home.nickpegg.com nickpegg.com | |
dns-nameservers 8.8.8.8 8.8.4.4 | |
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
*nat | |
:PREROUTING ACCEPT [0:0] | |
:INPUT ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
:POSTROUTING ACCEPT [0:0] | |
-A POSTROUTING -o eth0 -j MASQUERADE | |
COMMIT | |
*filter | |
:INPUT DROP [0:0] | |
:FORWARD ACCEPT [0:0] |
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
# My DHCP configs | |
dhcp-range=10.0.0.110,10.0.0.250,12h | |
# options for DNS | |
dhcp-option=option:domain-search,home.nickpegg.com,nickpegg.com | |
# Static DHCP entries | |
dhcp-host=00:24:1D:7D:5F:C3,10.0.0.10,host1 | |
dhcp-host=88:30:8A:22:2E:74,10.0.0.11,host2 | |
dhcp-host=00:23:54:1A:16:2D,10.0.0.12,host3 |
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
# Set up some logging. VERY useful to see why things aren't working. | |
logger_syslog=-1 | |
logger_syslog_level=2 | |
logger_stdout=-1 | |
logger_stdout_level=2 | |
# Which interface to use and which bridge to join | |
interface=wlan0 | |
bridge=br0 |
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 | |
# pingwatch.sh - ping a thing, if pings fail, log it and run an MTR | |
# first argument is the host to ping and MTR upon failure | |
# the rest of the arguments are additional hosts to MTR | |
if [ -z $1 ]; then | |
echo "You must supply a host to ping!" | |
echo "Usage: ./pingwatch.sh [host] [[mtr_host] ...]" |
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 python3 | |
# Receives a TCP packet, destructs it, pretty-prints it | |
# Packet structures taken from here: | |
# http://en.wikipedia.org/wiki/IPv4#Header | |
# http://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure | |
import socket |
OlderNewer