Skip to content

Instantly share code, notes, and snippets.

Avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@FlorianHeigl
FlorianHeigl / junos-netflow.cmd
Last active Nov 7, 2020
Configure Juniper NFX NexGen NetFlow (inline)
View junos-netflow.cmd
set system ntp server ntp1.ispname.net
set interfaces ge-1/0/2 unit 0 family inet sampling input
set interfaces ge-1/0/2 unit 0 family inet sampling output
set services flow-monitoring version9 template ipv4-test ipv4-template
set forwarding-options sampling instance test-ins family inet input rate 100
set forwarding-options sampling instance test-ins family inet input run-length 19
set forwarding-options sampling instance test-ins family inet output flow-server 172.16.xx.xx port 2055
set forwarding-options sampling instance test-ins family inet output flow-server 172.16.xx.xx version9 template ipv4-test
set forwarding-options sampling instance test-ins family inet output inline-jflow source-address 192.168.x.x
@FlorianHeigl
FlorianHeigl / configure_apcupsd.md
Last active Nov 6, 2020 — forked from gschora/configure_apcupsd
configuring apcupsd to suspend all running VM and then shutdown the esxi 5.5 u1 host
View configure_apcupsd.md

Instructions

Description

these are instructions for automating the suspend and shutdown of ESXi VMs and host in case of a power failure. works with APC/Schneider SmartUPS 750xl and ESXi 5.5u1

Steps

  1. make a new VM and install Ubuntu-Server on it
@FlorianHeigl
FlorianHeigl / configure_apcupsd
Created Nov 6, 2020 — forked from gschora/configure_apcupsd
configuring apcupsd to suspend all running VM and then shutdown the esxi 5.5 u1 host
View configure_apcupsd
###############################################################################################################
# these are instructions for automating the suspend and shutdown of esxi vm's and host in case of a
# power failure.
# works with apc smartups 750xl and esxi 5.5u1
###############################################################################################################
0# make a new VM and install Ubuntu-Server on it
1# install apcupsd
apt-get install apcupsd
@FlorianHeigl
FlorianHeigl / jail.local
Created Oct 23, 2020 — forked from pida42/jail.local
Fail2Ban - SMTP fiters that helps me resolve attacked mail server with Postfix and Dovecot
View jail.local
## content of: /etc/fail2ban/jail.local
[mail-smtp]
enabled = true
logpath = /var/log/mail.log
filter = mail-smtp
maxretry = 1
action = iptables-multiport[name=mail-smtp, port="25,587", protocol=tcp]
View psex.yml
- name: Download and run ConfigureRemotingForAnsible.ps1 to setup WinRM
psexec:
hostname: '{{ hostvars[inventory_hostname]["ansible_host"] | default(inventory_hostname) }}'
connection_username: '{{ ansible_user }}'
connection_password: '{{ ansible_password }}'
encrypt: yes
executable: powershell.exe
arguments: '-'
stdin: |
$ErrorActionPreference = "Stop"
View rbl_check
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# (c) 2013 Heinlein Support GmbH
# Robert Sander <r.sander@heinlein-support.de>
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation in version 2. This file is distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
View noseei
[root@wwdbemame floh]# nvme list
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
[root@wwdbemame floh]# sfx-nvme list
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/sfdv0n1 UC1945A7118M AF5UP34HTCSF3T2A 1 3.84 TB / 3.84 TB 4 KiB + 0 B 00004759
@FlorianHeigl
FlorianHeigl / 01_noformat.md
Last active Sep 21, 2020
can't get CSD to show higher capacity anymore
View 01_noformat.md

System OV

[root@wwdbemame pkg]# uname -a
Linux wwdbemame.internal.triasoft.de 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@wwdbemame pkg]# rpm -aq  | grep -e CSD -e sfx
sfx3xdriver-src-3.2.1.0-52500.el8.x86_64
CSD2000-U2-04759-0.x86_64
@FlorianHeigl
FlorianHeigl / 900.etckeeper
Last active Sep 15, 2020
FreeBSD etckeeper periodic job
View 900.etckeeper
#!/usr/bin/env bash
set -eu
# from https://gist.githubusercontent.com/kenjiskywalker/4372273/raw/11af3f5ca1f05b803a2828a8b3eb2f2a288c2311/etckeeper
check_clean() {
cd "$1"
git_diff=$( git diff | head -n1 | cut -d " " -f 1 )
[ -n "$git_diff" ] && return 1
}
@FlorianHeigl
FlorianHeigl / mpath-install.md
Last active Aug 22, 2020
mpath installation
View mpath-install.md
You can’t perform that action at this time.