Skip to content

Instantly share code, notes, and snippets.

View AcidSlide's full-sized avatar

Rikki Vizcarra AcidSlide

View GitHub Profile
@AcidSlide
AcidSlide / nft2ipset
Last active July 13, 2025 11:18
/etc/init.d/nft2ipset: An OPTIMIZED version for nftables set to ipset synchronizer for use with OpenWRT/mwan3
#!/bin/sh
#check if the script is already running
PID=$$
SCRIPT="$(basename $0)"
TMPDIR="/tmp"
MONITORPIDFILE="$TMPDIR/$SCRIPT-$$.nftmonitorpid"
MONITORFIFO="$TMPDIR/$SCRIPT-$$.nftmonitorfifo"
mkfifo "$MONITORFIFO"
# Extract all ipset names from MWAN3