Browse Source

corrections

master
Ralph Rönnquist 5 months ago
parent
commit
1c53c4e38e
2 changed files with 5 additions and 5 deletions
  1. +2
    -2
      firewall-cron
  2. +3
    -3
      firewall.sh

+ 2
- 2
firewall-cron View File

@@ -6,10 +6,10 @@

cd $(dirname $0)

. ./firewall.conf
SET=DIDAFF

# Ensure the set exist; complain and fail otherwise
/sbin/ipset list $SET >/dev/null || exit 1

# Update the set from the DIDAFF database
./didaff list | /usr/bin/xargs -n1 /sbin/ipset add $SET -exist
./didaff list | /usr/bin/xargs -r -n1 /sbin/ipset add $SET -exist

+ 3
- 3
firewall.sh View File

@@ -1,16 +1,16 @@
# Firewall configuration

SET=BADDIES
SET=DIDAFF
TIMEOUT=10800 # 3 hours

# How to add the iptables rule(s) using the set
iptables_add() {
iptables -I FORWARD -i wanbr -m set --match-set $SET src -j DROP
iptables -I FORWARD -i eth0 -m set --match-set $SET src -j DROP
}

# How to remove the iptables rule(s) using the set
iptables_del() {
iptables -D FORWARD -i wanbr -m set --match-set $SET src -j DROP
iptables -D FORWARD -i eth0 -m set --match-set $SET src -j DROP
}

# How to add the nominated set with the given default timeout


Loading…
Cancel
Save