Skip to content

Instantly share code, notes, and snippets.

@lucashalbert
lucashalbert / ipa-import-dns-zone.sh
Created October 14, 2019 20:38
Script to import an existing BIND DNS zone to IPA
#!/bin/bash
print_version() {
cat <<EOF
####################################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date: 10/14/2019
# Last Edited: 10/14/2019
# Version: 2019.10.14
# Description: Parse a BIND DNS zone (minus the SOA) and import directly to IPA
@lucashalbert
lucashalbert / configure_k8s.sh
Created March 7, 2019 17:31
Script to install and configure kubernetes on CentOS-7
#######################
# === All Systems === #
#######################
# Ensure system is fully patched
sudo yum -y makecache fast
sudo yum -y update
# Disable swap
sudo swapoff -a
@lucashalbert
lucashalbert / Hardened Vanilla Cisco Configuration
Last active November 8, 2023 08:47
A Hardened Vanilla Cisco Config for use on switches
en
conf t
crypto key zeroize
no ip finger
no service tcp-small-servers
no service udp-small-servers
no service config
no ip source-route
no service pad
service tcp-keepalives-in
@lucashalbert
lucashalbert / Uninstall-SEP.ps1
Created January 6, 2021 15:23
Script is designed to test if Sophos Endoint Protection is installed and proceed with uninstall.
<#
.SYNOPSIS
Script is designed to test if Sophos Endoint Protection is installed and proceed with uninstall.
.DESCRIPTION
Uninstall Sophos Endpoint Protection.
.INPUTS
none
@lucashalbert
lucashalbert / Install-GraylogSidecar.ps1
Created January 6, 2021 13:42
Script to automate the installation of the Graylog Sidecar.
<#
.SYNOPSIS
Install-GraylogSidecar.ps1 - Script to automate the installation of the Graylog Sidecar.
.DESCRIPTION
Automates the installation of the Graylog Sidecar.
.OUTPUTS
Results are output to the PowerShell window.
.PARAMETER installer
Specify the path to the Graylog Sidecar installer
.PARAMETER server
@lucashalbert
lucashalbert / Get-VMwareSnapshots.ps1
Last active April 8, 2019 14:36
Creates an HTML snapshot report from the specified vSphere/vCenter server.
<#
####################################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date Written: 4/24/2018
# Date Modified: 04/08/2019
# Version: 2019.04.08
# Description: Creates an HTML snapshot report from the specified
# vSphere/vCenter server. This script requires that the VMware
# PowerCLI module to be installed and loaded.
@lucashalbert
lucashalbert / createChrootedHome.sh
Created March 27, 2019 16:50
Creates a new home directory with the specified owner and group. Sets advanced ACLs and sticky bits.
#!/bin/bash
print_version() {
cat <<EOF
####################################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date: 12/13/2016
# Last Edited: 03/27/2019
# Version: 2019.03.27
# Description: Creates a new directory with the specified owner and
<#
Author: Lucas Halbert <contactme@lhalbert.xyz>
Date Written: 08/18/2017
Date Modified: 08/31/2017
Version: 0.3
Description: Imports a CSV file with names and emails into a specified distribution group
Revision History:
08/31/2017 c0.3 - Add Try/Catchs and logging to script.
@lucashalbert
lucashalbert / Windows10Decrapifier.ps1
Last active March 19, 2019 13:43
A Windows 10 Decrapifier Script
<#
.SYNOPSIS
Decrapify Windows 10 by uninstalling default crapware and disable Telemetry services
.DESCRIPTION
Uninstall stupid useless garbage that Microsoft ships with Windows 10 by default.
.NOTES
Uninstall stupid useless garbage that Microsoft ships with Windows 10 by default.
@lucashalbert
lucashalbert / bind-util.sh
Last active March 19, 2019 13:42
Utilizes named and DNSSEC utilities to assist in generating KSKs and ZSKs as well as assisting in signing DNS zones with DNSSEC. This utility also has the ability to leverage rndc commands for reloading/refreshing zones on local and remote bind servers.
#!/bin/bash
print_version() {
cat <<EOF
##########################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date: 04/29/2016
# Last Edited: 03/07/2019
# Version: 2019.03.07
# Description: Utilizes named and DNSSEC utilities to assist in