Skip to content

Instantly share code, notes, and snippets.

View MadDirtMonkey's full-sized avatar
🐒

Lloyd MadDirtMonkey

🐒
View GitHub Profile
@MadDirtMonkey
MadDirtMonkey / README.md
Last active July 12, 2025 07:46
Automatically reboot OPNsense if there is no WAN access

Overview

This is a super simple bash script that will ping Googles DNS servers every 10 minutes and if there is no response, try an interface down/up before it rebooting the machine.

NOTE: You will probably need to update the script where it says igc0 with your WAN interfaces name (you can find this easily through the GUI or by running ifconfig).

Instructions

  1. Copy the ping_check.sh file to /usr/local/etc/rc.d
  2. Make it executable with chmod 755 ping_check.sh
@MadDirtMonkey
MadDirtMonkey / script.sh
Created December 18, 2024 21:42
Installing Realtek RTL8125 drivers on Proxmox
# Install build dependencies + appropriate linux-headers package
apt install -y dkms build-essential pve-headers-$(uname -r)
# Download the latest r8125 dkms package
curl -s https://api.github.com/repos/awesometic/realtek-r8125-dkms/releases/latest |
grep "browser_download_url.*amd64.deb" |
cut -d : -f 2,3 |
tr -d \" |
wget -i -
@MadDirtMonkey
MadDirtMonkey / README.md
Created December 20, 2024 20:57
Proxmox - passing CIFS share to unprivileged LXC container

To pass a CIFS/SMB share to an unprivileged LXC container, we will need to configure the mount on the Proxmox host and then pass this through to the LXC container.

The following steps need to be performed on your Proxmox host:

1. Create a mount point

mkdir -p /mnt/media