This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sort out your own auth. | |
com2sec mynetwork 192.168.0.1/24 COMMUNITYNAME | |
rocommunity COMMUNITYNAME default .1 | |
syscontact My Name <[email protected]> | |
syslocation Judecca | |
# LibreNMS had some example extends for Linux so I put these together for macOS. | |
extend distro /bin/bash -c '/usr/bin/sw_vers|grep -v Build|sed -e "s/^.*:.//"|tr "\\n" " "' | |
# This gives a pretty name, but a pretty name isn't always available in a system-wide place and pointing into /Users/ somewhere is bad. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Fetch current govcloud IP ranges | |
/usr/bin/curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '[.prefixes]|.[]|.[] | select(.region|test("us-gov")) | .ip_prefix| gsub("\""; "")' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# libvirt is rude and clobbers rules but lets us hook in via /etc/libvirt/hooks/network, update the IP and NIC if you need to. | |
# This adds a simple rule to accept NEW incoming packets on a host so a guest (or perhaps something like a UPNP daemon on the host) can determine what comes and goes | |
# What is looks like before: | |
# ACCEPT all -- * virbr0 0.0.0.0/0 192.168.122.0/24 ctstate RELATED,ESTABLISHED | |
# REJECT all -- * virbr0 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable | |
# What it looks like after | |
# ACCEPT all -- * virbr0 0.0.0.0/0 192.168.122.0/24 state NEW | |
# ACCEPT all -- * virbr0 0.0.0.0/0 192.168.122.0/24 ctstate RELATED,ESTABLISHED | |
# REJECT all -- * virbr0 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Builds a module that is present in the kernel sources but not built and shipped by Red Hat. | |
# For me, this was a 5Gbps USB NIC needing the aqc111 module (not atlantic) on RHEL 8. | |
# | |
# It grabs the kernel src RPM based on the latest you have installed | |
# This might be a lot easier in DKMS. | |
MODULE="aqc111" | |
MODULE_KPATH="drivers/net/usb" | |
MODULE_KCONF="CONFIG_USB_NET_AQC111" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: Speak Faulted Alarm Sensors Script | |
description: "" | |
sequence: | |
- service: tts.cloud_say | |
data: | |
entity_id: media_player.office_sonos | |
message: > | |
{% set lst = states.binary_sensor | | |
rejectattr('attributes.device_class', 'undefined') | | |
selectattr('entity_id', 'in', integration_entities('mqtt')) | |
OlderNewer