wok-6.x annotate fail2ban/receipt @ rev 21593
updated audacity (2.0.6 -> 2.3.2)
author | Hans-G?nter Theisgen |
---|---|
date | Tue May 21 13:55:18 2019 +0100 (2019-05-21) |
parents | d8d9abb5377f |
children | 5ea0ce1cecc0 |
rev | line source |
---|---|
pascal@1809 | 1 # SliTaz package receipt. |
pascal@1809 | 2 |
pascal@1809 | 3 PACKAGE="fail2ban" |
Hans-G?nter@20908 | 4 VERSION="0.10.4" |
pascal@1809 | 5 CATEGORY="network" |
Hans-G?nter@20908 | 6 TAGS="monitor network" |
Hans-G?nter@20908 | 7 SHORT_DESC="Scans log files to ban IPs that make too many password failures." |
pascal@1809 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15002 | 9 LICENSE="GPL2" |
Hans-G?nter@20908 | 10 WEB_SITE="http://www.fail2ban.org/wiki/index.php/Main_Page" |
Hans-G?nter@20908 | 11 |
pascal@15799 | 12 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@20908 | 13 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/$VERSION.tar.gz" |
pascal@1809 | 14 |
pascal@13206 | 15 DEPENDS="iptables" |
Hans-G?nter@20908 | 16 BUILD_DEPENDS="python" |
Hans-G?nter@20908 | 17 CONFIG_FILES="/etc/fail2ban" |
pascal@13206 | 18 |
pascal@1809 | 19 # Rules to configure and make the package. |
pascal@1809 | 20 compile_rules() |
pascal@1809 | 21 { |
pascal@11341 | 22 python setup.py install --root=$DESTDIR |
pascal@1809 | 23 } |
pascal@1809 | 24 |
pascal@1809 | 25 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1809 | 26 genpkg_rules() |
pascal@1809 | 27 { |
slaxemulator@13197 | 28 mkdir -p $fs/etc/logrotate.d $fs/etc/init.d |
slaxemulator@13197 | 29 cp -a $install/* $fs |
pascal@20059 | 30 sed -i -e 's|127.0.0.1.*|& 192.168.0.0/16|;s|sshd.log|messages|' \ |
pascal@11341 | 31 -e '/ssh-iptables/{nn;s/false/true/}' $fs/etc/fail2ban/jail.conf |
al@18077 | 32 |
erjo@16729 | 33 cp -a $stuff/etc/fail2ban/ $fs/etc/ |
erjo@16729 | 34 cp -a $stuff/etc/init.d $fs/etc/ |
al@18077 | 35 |
pascal@11341 | 36 cat >> $fs/etc/fail2ban/jail.conf <<EOT |
pascal@13258 | 37 [apache-noscript] |
pascal@13258 | 38 |
pascal@13258 | 39 enabled = false |
pascal@13258 | 40 port = http,https |
pascal@13258 | 41 filter = apache-noscript |
pascal@13258 | 42 action = iptables-allports[name=APACHE-NOSCRIPT] |
pascal@13258 | 43 logpath = /var/log/apache/*errors |
pascal@13258 | 44 maxretry = 2 |
pascal@13258 | 45 |
pascal@13258 | 46 [apache-proxy] |
pascal@13258 | 47 |
pascal@13258 | 48 enabled = false |
pascal@13258 | 49 port = http,https |
pascal@13258 | 50 filter = apache-proxy |
pascal@13258 | 51 action = iptables-allports[name=APACHE-PROXY] |
pascal@13258 | 52 logpath = /var/log/apache/*access |
pascal@13258 | 53 bantime = 172800 |
pascal@13258 | 54 maxretry = 2 |
pascal@13258 | 55 |
al@18077 | 56 [apache-w00tw00t] |
erjo@16729 | 57 enabled = false |
al@18077 | 58 filter = apache-w00tw00t |
al@18077 | 59 action = iptables[name=Apache-w00tw00t,port=80,protocol=tcp] |
al@18077 | 60 logpath = /var/log/apache/*access |
al@18077 | 61 maxretry = 1 |
al@18077 | 62 bantime = 172800 |
erjo@16729 | 63 |
pascal@13257 | 64 [lighttpd-fastcgi] |
pascal@13257 | 65 |
pascal@13257 | 66 enabled = false |
pascal@13257 | 67 port = http,https |
pascal@13257 | 68 filter = lighttpd-fastcgi |
pascal@13258 | 69 action = iptables-allports[name=LIGHTTPD-FASTCGI] |
pascal@13257 | 70 logpath = /var/log/lighttpd/*error*.log |
pascal@13257 | 71 maxretry = 2 |
pascal@13257 | 72 |
pascal@11341 | 73 [ssh-ddos] |
pascal@11341 | 74 |
pascal@11341 | 75 enabled = true |
pascal@11341 | 76 port = ssh,sftp |
pascal@11341 | 77 filter = sshd-ddos |
pascal@11341 | 78 action = iptables-allports[name=SSHDDOS] |
pascal@11341 | 79 logpath = /var/log/messages |
pascal@11341 | 80 maxretry = 2 |
pascal@11341 | 81 |
pascal@13225 | 82 [fail2ban] |
pascal@13225 | 83 enabled = true |
pascal@13225 | 84 filter = fail2ban |
pascal@13225 | 85 action = iptables-allports[name=FAIL2BAN] |
pascal@13225 | 86 logpath = /var/log/fail2ban.log |
pascal@13225 | 87 maxretry = 5 |
pascal@13225 | 88 findtime = 604800 |
pascal@13225 | 89 bantime = 604800 |
pascal@11341 | 90 EOT |
erjo@16729 | 91 #ln -s /usr/bin/fail2ban-client $fs/etc/init.d/fail2ban |
pascal@11341 | 92 cat > $fs/etc/logrotate.d/fail2ban <<EOT |
pascal@11341 | 93 /var/log/fail2ban.log { |
pascal@11341 | 94 weekly |
pascal@11341 | 95 rotate 10 |
pascal@11341 | 96 compress |
pascal@11341 | 97 postrotate |
pascal@11341 | 98 /etc/init.d/fail2ban reload >/dev/null || true |
pascal@11341 | 99 endscript |
pascal@1809 | 100 } |
pascal@11341 | 101 EOT |
pascal@11341 | 102 } |