Skip to content

Instantly share code, notes, and snippets.

View cneira's full-sized avatar

Neirac cneira

  • Santiago, Chile
  • 17:12 (UTC -12:00)
View GitHub Profile
@cneira
cneira / hardware-configuration.nix
Created September 1, 2025 21:26 — forked from vizanto/hardware-configuration.nix
NixOS 17.03 on SmartOS LX-branded Zone
{ config, lib, pkgs, ... }: with lib;
{
### SmartOS Linux Branded Zone specific configuration
boot.isContainer = true;
boot.loader.initScript.enable = true;
networking.useDHCP = false;
networking.firewall.enable = false;
services.nscd.enable = true;# false;
@cneira
cneira / gist:b3e7354089234af3b1397792623b26c1
Created July 11, 2025 13:36 — forked from danmack/gist:6d69a6d2ab08e6dbf8a1727e9c2267a0
SmartOS add disk to bhyve linux container
Adding a new disk to a bhyve vm takes a few steps.
1. increase the quota on the zfs dataset to accomodate the additional
space.
2. create a zvol inside the zone
3. stop the vm and update its configuration to reflect the change
4. start the vm, login and use the disk
# update quota
@cneira
cneira / ComPort over Network.md
Created October 29, 2024 20:34 — forked from DraTeots/ComPort over Network.md
ComPort over Network
@cneira
cneira / smartos-on-hetzner.doc
Created October 17, 2024 18:26 — forked from Tanhueco/smartos-on-hetzner.doc
SmartOS On Hetzner Dedicated Server and Subnet
# 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 at Hetzner (with a /29)
##################################################################
# This is another version of Jahewson's Gist here: https://gist.github.com/jahewson/4492300 that adds a gate to prevent packets
from leaking out from the main MAC address.
@cneira
cneira / readme.md
Created September 19, 2024 12:13 — forked from mrladeia/readme.md
Iptables to Oracle Cloud port 80 and 443 open

IPTABLES to Oracle Cloud port 80 and 443 open

If you need to open up ports 80 and 443, on file /etc/iptables/rules.v4 just add

-A INPUT -p tcp -m state --state NEW -m multiport --dports 80,443 -j ACCEPT

directly below

@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