[ale] bonehead ipset additions
DJPfulio at jdpfu.com
DJPfulio at jdpfu.com
Sun Feb 13 23:31:32 EST 2022
My script to do this is 4 lines.
No error checking.
I didn't want to overthink it. I don't even check that the euid is 0. That's solved by placing the script in ~root/bin/. K.I.S.S.
#!/bin/bash
IPSET_RULES_FILE="/etc/ipset.up.rules"
# Make a backup
cp $IPSET_RULES_FILE $IPSET_RULES_FILE.bak
# Update the live ruleset - any errors?
ipset add countryblock $1
# Append the new rule to the bottom
echo "add countryblock $1 " | tee -a $IPSET_RULES_FILE
On 2/13/22 17:50, Alex Carver via Ale wrote:
> I'm putting a tiny utility script together to make it faster for me
> to update ipset lists and add them to a restore file in one shot but
> I've run into a slight hiccup with what I wanted to accomplish.
>
Lots of brilliant stuff deleted.
>
> Thoughts? _______________________________________________
More information about the Ale
mailing list