diff --git a/docker-compose.yml b/docker-compose.yml index d9f339b..ac78c5f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -72,6 +72,7 @@ services: DNS1: 1.1.1.1 DNS2: 1.0.0.1 VIRTUAL_HOST: pihole.abhinavsarkar.net + TZ: "Asia/Kolkata" ports: - "53:53/tcp" - "53:53/udp" diff --git a/fail2ban/iptables-pihole-geoip-fence.conf b/fail2ban/iptables-pihole-geoip-fence.conf index 3e9d79b..6d5a53e 100644 --- a/fail2ban/iptables-pihole-geoip-fence.conf +++ b/fail2ban/iptables-pihole-geoip-fence.conf @@ -11,23 +11,21 @@ before = iptables-blocktype.conf # Notes.: command executed once at the start of Fail2Ban. # Values: CMD # -actionstart = iptables -N f2b- - iptables -A f2b- -j RETURN - iptables -I -p -m multiport --dports -j f2b- +actionstart = iptables -N DOCKER-USER + iptables -A DOCKER-USER -j RETURN # Option: actionstop # Notes.: command executed once at the end of Fail2Ban # Values: CMD # -actionstop = iptables -D -p -m multiport --dports -j f2b- - iptables -F f2b- - iptables -X f2b- +actionstop = iptables -F DOCKER-USER + iptables -X DOCKER-USER # Option: actioncheck # Notes.: command executed once before each actionban command # Values: CMD # -actioncheck = iptables -n -L | grep -q 'f2b-[ \t]' +actioncheck = iptables -n -L | grep -q 'DOCKER-USER[ \t]' # Option: actionban # Notes.: command executed when banning an IP. Take care that the @@ -37,7 +35,7 @@ actioncheck = iptables -n -L | grep -q 'f2b-[ \t]' # actionban = IP= && COUNTRY=$(geoiplookup $IP | egrep "") && [ "$COUNTRY" ] || - (iptables -I f2b- 1 -s -j ) + (iptables -I DOCKER-USER 1 -s -j ) # Option: actionunban # Notes.: command executed when unbanning an IP. Take care that the @@ -47,7 +45,7 @@ actionban = IP= && # actionunban = IP= && COUNTRY=$(geoiplookup $IP | egrep "") && [ "$COUNTRY" ] || - (iptables -D f2b- -s -j ) + (iptables -D DOCKER-USER -s -j ) [Init] @@ -59,7 +57,7 @@ country_list = IN|India # Default name of the chain # -name = pihole-geoip +name = DOCKER-USER # Option: port # Notes.: specifies port to monitor