Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@zoonderkins
zoonderkins / block-scanners-update.service
Last active March 12, 2026 08:39
blocklist-ipset common internet scanner like shadow cenysus
[Unit]
Description=Update scanner and malicious IP blocklists
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/block-scanners.sh input-only
TimeoutStartSec=30min
Nice=10
sudo apt-get remove --purge -y grub-cloud-amd64 || true
sudo dpkg --configure -a
sudo apt-get install -f -y
dpkg -l | grep grub-cloud-amd64 || true
dpkg --audit || true
apt update; apt upgrade -y
apt -y autoremove --purge;
update-grub;
@zoonderkins
zoonderkins / dnsdist-install.sh
Created March 11, 2026 09:19
dnsdist-install-debian
#!/usr/bin/env bash
set -Eeuo pipefail
export DEBIAN_FRONTEND=noninteractive
DNSDIST_CHANNEL="${DNSDIST_CHANNEL:-21}" # default 21 https://repo.powerdns.com/
APT_DIR="/etc/apt"
SOURCES_DIR="/etc/apt/sources.list.d"
PREF_DIR="/etc/apt/preferences.d"
KEYRING_DIR="/etc/apt/keyrings"
@zoonderkins
zoonderkins / README.md
Last active December 25, 2025 12:51
cisco-duo-install on debian 13 to protect ssh

Duo SSH 2FA 安全登入整合

適用 Linux 伺服器:Debian / Ubuntu / Proxmox / Standard VPS
支援 密碼 + Duo / 公鑰 + Duo / Root Key + Duo,使用者密碼 + Duo


🚀 功能特色

功能 支援
@zoonderkins
zoonderkins / dnsdist-2-ebpf-fix-on-debian.md
Created September 13, 2025 01:48
dnsdist2-ebpf-fix-on-debian

Install

apt install bpftool
uname -r
bpftool feature probe | sed -n '1,200p'
mount | grep bpffs || sudo mount -t bpf bpffs /sys/fs/bpf

@zoonderkins
zoonderkins / fix-debian-locale-bash-warning.md
Created September 13, 2025 01:31
debian-locale-bash-warning

Error

-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
@zoonderkins
zoonderkins / debian13-install-dnsdist-2-1.md
Last active September 11, 2025 05:20
dnsdist-2.1-master install on debian 13

Error

The following packages have unmet dependencies:
 dnsdist : Depends: libre2-9 (>= 20131024+dfsg) but it is not installable
E: Unable to correct problems, you have held broken packages.
E: The following information from --solver 3.0 may provide additional context:
   Unable to satisfy dependencies. Reached two conflicting decisions:
   1. dnsdist:amd64=2.1.0~alpha0+master.717.g1fe1273bc-1pdns.debian12 is selected for install
 2. dnsdist:amd64=2.1.0~alpha0+master.717.g1fe1273bc-1pdns.debian12 Depends libre2-9 (>= 20131024+dfsg)
@zoonderkins
zoonderkins / crowdsec-install-debian.sh
Last active March 12, 2026 02:14
crowdsec-install-debian
#!/usr/bin/env bash
set -Eeuo pipefail
export DEBIAN_FRONTEND=noninteractive
###############################################################################
# CrowdSec reinstall / install script for Debian 12/13/testing
#
# Features:
# --dry-run
@zoonderkins
zoonderkins / change-mac.sh
Created July 9, 2025 02:12 — forked from nixpulvis/change-mac.sh
Change your MAC address on OS X.
#!/bin/bash
ssid=$(networksetup -getairportnetwork en0 | cut -d ":" -f 2 | sed "s/^[ \t]*//")
sudo airport -z
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.\$//")
networksetup -setairportnetwork en0 "$ssid"
@zoonderkins
zoonderkins / script.md
Created July 9, 2025 00:28
random-reset-mac-address

Linux

INTERFACE=""
NEW_MAC=$(printf '02:%02x:%02x:%02x:%02x:%02x\n' $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)))
sudo ip link set $INTERFACE down
sudo ip link set $INTERFACE address "$NEW_MAC"
sudo ip link set $INTERFACE up