Skip to content

Instantly share code, notes, and snippets.

View FlorianHeigl's full-sized avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@FlorianHeigl
FlorianHeigl / jail.local
Created October 23, 2020 19:53 — forked from pida42/jail.local
Fail2Ban - SMTP fiters that helps me resolve attacked mail server with Postfix and Dovecot
## 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]
@FlorianHeigl
FlorianHeigl / configure_apcupsd
Created November 6, 2020 16:08 — forked from gschora/configure_apcupsd
configuring apcupsd to suspend all running VM and then shutdown the esxi 5.5 u1 host
###############################################################################################################
# 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 / configure_apcupsd.md
Last active November 6, 2020 16:47 — forked from gschora/configure_apcupsd
configuring apcupsd to suspend all running VM and then shutdown the esxi 5.5 u1 host

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
# Powershell refuses to connect to the Netbox API on our setup without this.
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}