Skip to content

Instantly share code, notes, and snippets.

View cneira's full-sized avatar
💭
I may be slow to respond.

Neirac cneira

💭
I may be slow to respond.
View GitHub Profile
@cneira
cneira / ipv6guide.md
Created June 7, 2024 13:31 — forked from timothyham/ipv6guide.md
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@cneira
cneira / block-tor-exit-nodes-iptables.md
Created November 30, 2023 02:10 — forked from jkullick/block-tor-exit-nodes-iptables.md
Block Tor Exit Nodes with IPTables
  1. Install ipset:
apt-get install ipset
  1. Create new ipset:
ipset create tor iphash
@cneira
cneira / sysctl-tunables
Created May 3, 2023 13:44 — forked from mizhka/sysctl-tunables
FreeBSD 13-GENERIC-CURRENT tunables
kern.maxproc: Maximum number of processes
kern.ngroups: Maximum number of supplemental groups a user can belong to
kern.ipc.shm_allow_removed: Enable/Disable attachment to attached segments marked for removal
kern.ipc.shm_use_phys: Enable/Disable locking of shared memory pages in core
kern.ipc.shmall: Maximum number of pages available for shared memory
kern.ipc.shmseg: Number of segments per process
kern.ipc.shmmni: Number of shared memory identifiers
kern.ipc.shmmin: Minimum shared memory segment size
kern.ipc.shmmax: Maximum shared memory segment size
kern.ipc.semaem: Adjust on exit max value
@cneira
cneira / smartos-on-a-budget.sh
Created December 23, 2022 19:57 — forked from jahewson/smartos-on-a-budget.sh
Installing and Configuring SmartOS on a budget server (with a /29)
# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date.
##################################################################
Installing and Configuring SmartOS on a budget server (with a /29)
##################################################################
# if you find this gist useful, please star it
# please be aware that budget hosting companies usually cut corners somewhere,
@cneira
cneira / error.txt
Created December 22, 2022 01:04 — forked from robinsmidsrod/error.txt
Booting SmartOS 20120309T073819Z directly from iPXE (aac9718) gives error
Download of kernel+initrd works on real hardware (HP/Compaq 6730b),
but this message comes up after a few seconds.
================================
krtld: failed to open 'unix'
krtld: bind_primary(): no relocation information found for module unix
krtld: error during initial load/link phase
krtld could neither locate nor resolve symbols for:
unix
@cneira
cneira / crossover-howtocompile.md
Created August 27, 2022 20:37 — forked from sarimarton/crossover-howtocompile.md
CodeWeavers CrossOver - How to compile from source! for macOS

This has been forked from https://gist.github.com/Alex4386/4cce275760367e9f5e90e2553d655309

For the latest discussion, see the comments there.

Updated guide (for CrossOver 20.0.0)

  • Install dependencies: Xcode developer tools (Command Line); cmake; gcc or clang to compile C code; bison >= 3.0 (can be upgraded via homebrew); xquartz; flex; mingw-w64; pkgconfig; you might also need freetype with brew install freetype
  • Make sure the right version of bison is in path: brew upgrade bison then check version and cd /usr/local/Cellar/bison/<version>/bin and export PATH="$(pwd):$PATH" then check with which bison
  • Download source (CodeWeavers CrossOver FOSS version Source) and extract it (double click the file in Finder or untar it: tar -xz source.tar.gz)
  • Add missing wine/include/distversion.h file with this content:
{
"acpi" : "on",
"autoboot" : "false",
"bootargs" : "",
"bootorder" : "cd",
"cdrom" : "/zones/iso/FreeBSD-12.1-RELEASE-amd64-disc1.iso",
"bootdisk" : {
"blocksize" : "8K",
"path" : "rpool/bsd1",
"size" : "20G",
@cneira
cneira / README.md
Created July 21, 2022 22:37 — forked from mgerdts/README.md
Install windows with bhyve

These are bare-bones instructions for creating a Windows image for bhyve on SmartOS. You will need a platform image that has the fix for OS-7117. Platform images that I've used in testing are here: iso tgz usb

Create a volume that will be the disk.

zfs create -o volblocksize=4k -V 16g -s zones/hdd-windows

This script will be used for booting from the CD.

@cneira
cneira / README.md
Created May 28, 2022 19:40 — forked from TyrfingMjolnir/README.md
Some example bhyve zone files for Joyent SmartOS

A minor list of how to create and boot a Bhyve-zone in Joyent SmartOS

cd /opt/local/artifacts/
vim zonemanifestBhyveFreeBSD.json
vmadm create < zonemanifestBhyveFreeBSD.json
curl -kLo /zones/UUID/root/FreeBSD-12.0-RC3-amd64-bootonly.iso

The following line is for KVM, not BHYVE, hence obsoleted for non-legacy boot options

vmadm boot UUID order=cd,once=d cdrom=/FreeBSD-12.0-RC3-amd64-bootonly.iso,ahci
@cneira
cneira / windows-10-pro-smartos-bhyve.md
Created April 4, 2022 13:39 — forked from skirmess/windows-10-pro-smartos-bhyve.md
Windows 10 Pro Image for SmartOS Bhyve

Windows 10 Pro

Windows 10 Pro ISO

Create a fresh Windows 10 Pro ISO file with Microsofts Media Creation Tool. (I created a Windows 10 Pro 64 bit German ISO image)

Save the created image on your SmartOS global zone.

cp ... /zones/Windows10_64de.iso