Skip to content

Instantly share code, notes, and snippets.

View egg82's full-sized avatar

egg82

View GitHub Profile
@egg82
egg82 / zsh-plugins.md
Last active December 31, 2019 20:56
ZSH plugins
TERM="xterm-256color"
POWERLEVEL9K_MODE="nerdfont-complete"
POWERLEVEL9K_DISABLE_PROMPT=true
POWERLEVEL9K_PROMPT_ON_NEWLINE=false
ZSH_THEME="powerlevel9k/powerlevel9k"

...

plugins=(
@egg82
egg82 / ubuntu_ad.md
Last active December 11, 2020 23:00
Ubuntu + AD

Yet another quick write-up, on Ubuntu 18.04 + Windows Server 2016 Active Directory

This guide allows you to hook up AD with an Ubuntu server for UNIX authentication using AD users.

It was difficult finding a guide that wasn't outdated or used some obscure software to get working, so this is that guide.

Filesystems/Hardware

All servers start from fresh, clean installs of Ubuntu 18.04.3 and Windows Server 2016

@egg82
egg82 / coredns_client.md
Last active December 9, 2024 15:19
CoreDNS on clients

Notes

This guide was designed for a fresh install of Ubuntu desktop 20.04

Edit the file /etc/sysctl.conf and add (or edit) the following line:

net.core.rmem_max=8388608

Reload sysctl

@egg82
egg82 / telegraf-qnap.conf
Created October 2, 2020 03:56
QNAP Telegraf config
[[inputs.snmp]]
agents = [ "10.0.0.5:161"]
interval = "45s"
timeout = "10s"
retries = 3
max_repetitions = 10
version = 2
community = "616a1b353f21d9495ffe536656f110299a27712a63fd4ae"
name = "snmp.NAS"
@egg82
egg82 / apt_cacher_ng.md
Last active February 26, 2025 21:20
AptCacherNg Apt Proxy Setup

More techniques - caching apt packages network-wide

This guide runs through setting up AptCacherNg on a proxy/server to provide apt caching to clients. The client proxy scripts allow for multiple proxies, and account for proxies being offline.

Note that, for obvious reasons, this only works on Debian-based machines (Ubuntu and derivatives as well).

Server (the cache/proxy)

Note: you will need port 3142 open to the clients using this cache/proxy

Debian/Ubuntu + Active Directory/LDAP v2

This is another quick write-up on getting Debian/Ubuntu to play nicely with LDAP groups. This includes logins, sudoers, home directories, default shells, the works.

This is tested and working on Ubuntu 18 and 20.04 and Windows Server 2016. This setup assumes you already have users/groups in AD/LDAP and have a basic understanding of users/groups.

While this guide is written toward Debian-based systems, some tweaks and downloading the appropriate PBIS script will allow this to work on any Linux-based system.

Install components

@egg82
egg82 / hardening.md
Last active April 2, 2022 12:46
Basic server hardening techniques

Trust

As is outlined in this LiveOverflow video, trusting information is hard.

Note that I disagree with some of the key talking points in the video, as you will see later on in this guide.

My credentials, as of time of writing:

  • Security+ certified
  • Linux admin for over a decade
  • Professional Linux admin for about 6 years
@egg82
egg82 / proxmox_nvidia.md
Last active April 13, 2025 18:45
NVidia Proxmox + LXC

Proxmox

Find the proper driver at the NVidia website.

Note: Make sure to select "Linux 64-bit" as your OS

Hit the "Search" button.

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCrHoDSGJ1dj9QMj9AysdHAQhmNnNgah5IgTSOT74Ym eddsa-key-20221010
#!/usr/bin/env bash
# https://stackoverflow.com/questions/51653450/show-call-stack-in-bash
stacktrace () {
local i=1 line file func
while read -r line func file < <(caller ${i}); do
echo >&2 "[${i}] ${file}:${line} ${func}()"
echo >&2 ">>> $(sed -n "${line}"p "${file}")"
((i++))
done