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