Cleaned up and modified

This commit is contained in:
Phil Connor 2024-06-17 08:37:59 -05:00
parent ef7c97c12b
commit 9f59dfc9e8

View File

@ -4,31 +4,22 @@
# details. Note that output from these scripts is not seen via the
# the ufw command, but instead via ufw-init.
#
# Copyright 2013 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# ufw-blocklist edition: IP blocklist extension for Ubuntu ufw
# https://github.com/poddmo/ufw-blocklist
#
###############################################################################
#### ####
#### Based on ufw-blocklist edition: IP blocklist extension for Ubuntu ufw ####
#### https://github.com/poddmo/ufw-blocklist ####
#### ####
#### Modified https://mylinux.work ####
#### Version 1.0.2.061324 ####
#### Contact: contact@mylinux.work ####
#### ####
###############################################################################
set -e
export ipsetname=ufw-blocklist-ipsum
# seed file containing the list of IP addresses to be blocked, one per line
# curl -sS -f --compressed 'https://raw.githubusercontent.com/stamparm/ipsum/master/levels/4.txt' > /etc/ipsum.4.txt
# ipset is updated daily by /etc/cron.daily/ufw-blocklist-ipsum
export seedlist=/etc/ipsum.4.txt
export seedlist=/etc/ipsum.ipv4.txt
export IPSET_EXE="/sbin/ipset"
# check ipset exists and is executable
@ -37,7 +28,6 @@ export IPSET_EXE="/sbin/ipset"
exit 1
}
# Function to check if a chain exists (chain_exists ufw_blocklist_input && action if true || action if false)
chain_exists() {
{