Skip to content

Instantly share code, notes, and snippets.

@zenny
zenny / edgerouter.md
Created February 7, 2021 20:35 — forked from jperkin/edgerouter.md
OpenBSD/octeon EdgeRouter Lite

This is a nifty little device for under £100 suitable for a home router.

I am using one running OpenBSD 6.8 for my AAISP PPPoE connection (avoiding the supplied VMG1312-B10A which has a number of issues).

Installation

I bought a SanDisk 16GB USB stick as there were reports the supplied USB stick isn't particularly reliable, plus it's nice to keep it separate in case of backup or selling the device in the future.

Download the OpenBSD miniroot68.img file system and dd(1) it, for example on macOS (assuming /dev/disk2):

@zenny
zenny / edge_router_lite_vpn.md
Created February 1, 2021 11:22
Create VPN for Ubiquiti Edge Router Lite 3

Edge Router Lite VPN Config Script

First, get into config mode with configure

From here, edit the following interface, pool. start and end, PSK, local users and DNS server (add more if needed):

set vpn ipsec ipsec-interfaces interface eth0
set vpn l2tp remote-access dhcp-interface eth0
set vpn l2tp remote-access client-ip-pool start 10.10.10.150
@zenny
zenny / letsencrypt-proxmox.md
Created February 1, 2021 11:19 — forked from lichti/letsencrypt-proxmox.md
Proxmox with letsencrypt ssl
git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
 --standalone \
@zenny
zenny / letsencrypt-proxmox.md
Created February 1, 2021 11:19
Proxmox with letsencrypt ssl
git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
 --standalone \
@zenny
zenny / proxmox-proxy
Created February 1, 2021 11:19
Running Proxmox behind a single IP address
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables.
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding.
Network configuration
Here’s how it’s done:
Create a virtual interface that serves as the gateway for your VMs:
@zenny
zenny / .tmux.conf
Created March 17, 2020 16:11 — forked from CSaratakij/.tmux.conf
Tmux's Config that's very close to i3wm (Setting with an idea of using tmux without x-server)
# Config that is very close to a i3 window manager's keybinding.
set -s escape-time 0
setw -g aggressive-resize on
# First remove *all* keybindings
unbind-key -a
# List keys
bind-key ? list-keys
@zenny
zenny / tmux-migrate-options.py
Last active January 7, 2020 07:28 — forked from tbutts/tmux-migrate-options.py
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@zenny
zenny / adminer_setup.sh
Created January 1, 2020 18:29 — forked from zloynemec/adminer_setup.sh
Secure adminer nginx setup
# Secure adminer setup
# Author Taras Kozlov
# download adminer to separate directory
mkdir -p /var/www/admin
cd /var/www/admin
wget http://www.adminer.org/latest.php -O adminer.php
echo '<?php phpinfo(); >' > info.php
sudo -i
@zenny
zenny / dnsupdate.py
Created December 23, 2019 14:01 — forked from pklaus/dnsupdate.py
dnsupdate is meant to replace nsupdate, the standard DDNS update tool created by BIND authors ISC. While nsupdate does the job it is awkward to wrap in scripts and its usage in general is just not very intuitive. dnsupdate is meant to work well from the command line or from scripts and easy to use. It also does some nice things like automaticall…
#!/usr/bin/env python2.7
# Matt's DNS management tool
# Manage DNS using DDNS features
#
# See http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/
#
# Usage: dnsupdate -s server -k key -t ttl add _minecraft._tcp.mc.example.com SRV 0 0 25566 mc.example.com.
# -h HELP!
# -s the server
# -k the key
@zenny
zenny / c920.md
Created July 18, 2019 21:52 — forked from wwwins/c920.md
live streaming from raspberry pi with logitech usb c920

video stream(v4l2-ctl)

v4l2-ctl --list-devices
mmal service 16.1 (platform:bcm2835-v4l2):
        /dev/video0

HD Pro Webcam C920 (usb-3f980000.usb-1.2):
        /dev/video1