Skip to content

Instantly share code, notes, and snippets.

View FlorianHeigl's full-sized avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@kimdre
kimdre / README.md
Last active March 6, 2024 00:50
Fail2ban Config for CheckMk Authentication over Web UI

CheckMk Web Auth Fail2ban Config

Fail2ban Config for CheckMk Authentication over Web UI

This is a example fail2ban config for failed login attempts in the CheckMK Web UI Login Form.

Setup

Check for log files

CheckMK logs failed login attempts for each site separately at ~/var/log/web.log (relative path from the site's user).

@rusty-snake
rusty-snake / seccomp_init_btree.rs
Last active July 31, 2026 12:22
LD_PRELOAD library to change the default optimization level of libseccomp to build btree optimized filters.
// SPDX-License-Identifier: MIT
/*
* Copyright © 2023 rusty-snake
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@schossel
schossel / scrape_opnsense_dhcp_leases.py
Last active June 13, 2026 22:57
Get OPNSense DHCP Leases by python script
#!/usr/bin/env python3
# Scrapes pfSense DHCP Leases into List of (IP, MAC, Hostname, Description) format.
# Change URL/Username/Password below ... pip install lxml ... then you are all set.
#
# Modified 6/23/2019 (FryGuy)
# Edits: Aligned IP/MAC/Hostname into struct accounting for blank lines
# Minor: Cleaned up spacing, created global url/user/password vars, removed write to file
# Original Code/Inspiration: https://gist.github.com/pletch/037a4a01c95688fff65752379534455f
# Modified 03/14/2023 (schossel)
# Added Field Description and changed CSRF to work with OPNsense
@robin-checkmk
robin-checkmk / yt.yml
Created August 17, 2022 08:09
yt.yml from the Checkmk Ansible collection introduction
- name: "Roles."
hosts: localhost
gather_facts: true
vars_files:
- ./vars/config.yml
tasks:
- name: "Run server role."
ansible.builtin.import_role:
name: tribe29.checkmk.server
@kekyo
kekyo / Creator_CI20.md
Last active June 24, 2025 11:47
How to update latest packages on Imagination Creator CI20 Debian 8 (jessie)

How to update latest packages on Imagination Creator CI20 Debian 8 (jessie)

Imagination Creator CI20 board: A MIPS32 architecture evaluation board.

Imagination Creator CI20 board


@swisskyrepo
swisskyrepo / main.yml
Created March 12, 2022 23:03
Elastic EDR Ansible
---
- name: Add required dependencies.
apt:
name:
- apt-transport-https
- gnupg2
state: present
- name: Add Elasticsearch apt key.
apt_key:
fs.com type switches, model S5850 run regular linux.
Secret command "start shell" can be used to spawn regular shell on switch for debugging.
Password for this: !@#
Example:
$ show version
FSOS Software, S5850, Version 7.2.1
Copyright (C) 2020 by FS.COM. All rights reserved.
@azet
azet / a_qvfx10k_setup_with_qemu.md
Last active March 24, 2026 05:36
vqfx10k on kvm/qmu

install vQFX10k on KVM/QEMU for Testing or QA

This vQFX Platform is supposed to be used with vagrant and ships with a few nice fabrics that spin up on the go. But there's a few problems with that - which may not be instantly obvious if you plan on using it for testing or QA in your NetOps department:

  1. This Vagrant configuration relies and only supports virtualization via Virtualbox
    • so far no plans have been announced to switch from Virtualbox to another out of the box solution, so you'll have to hack this up a bit. libvirt, kvm/qemu makes this relatively simple, but you have to get familiar with their tools (again).
  2. vQFX comes in two "VMs": a Routing Engine (RE) and a Packet Forwarding Engine (PFE)
  • this is due to the way the hardware is actually set-up and working on a real bare metal switch or router (same story for vMX). ASICs are supplied in the form of shim kernel modules that make it possible to unit-test more advanced features or do functional testing before deploying on real (ide
@BercX
BercX / checkmk.md
Created December 3, 2021 12:53
CheckMK Scripts

Check MK Scripts

Add host to checkmk server:

Script automatically adds the computer to the hostlist on the checkmk server. Works on Windows 10, 7(with KB3191566 update).

  1. Create .ps1 file with following code.
  2. Change server and client(optional) variables.
  3. Run
@hamletmun
hamletmun / netbox_api.md
Created November 19, 2021 01:51
NetBox API (REST, GraphQL) with Powershell

NetBox API (REST, GraphQL) with Powershell

REST API

(Invoke-RestMethod -Headers @{'Authorization'='Token 0123456789abcdef0123456789abcdef01234567'} -Uri "https://netbox.my.org/api/circuits/circuits/?site_id=123").results
(Invoke-RestMethod -Headers @{'Authorization'='Token 0123456789abcdef0123456789abcdef01234567'} -Uri "https://netbox.my.org/api/dcim/sites/?region=amer&tenant=tenantname").results | Select-Object name,status
(Invoke-RestMethod -Headers @{'Authorization'='Token 0123456789abcdef0123456789abcdef01234567'} -Uri "https://netbox.my.org/api/ipam/prefixes/?tenant=tenantname").results | Select-Object prefix,site
(Invoke-RestMethod -Headers @{'Authorization'='Token 0123456789abcdef0123456789abcdef01234567'} -Uri "https://netbox.my.org/api/dcim/devices/?tenant=tenantname").results | Select-Object name,status