/defender

simple scripts to provide defence

Primary LanguageShellGNU General Public License v3.0GPL-3.0

defender

Build Status language author license

simple scripts to provide defence

accesslog.sh

ban ip from /home/site/access-log/access.log, the ban rule is in "ban $1" part of the script.

nohup bash accesslog.sh &

c.sh

ban ip according to the connection numbers noted on netstat.

write value in the script file:

# your public ip
public_ip=

# max connection number
define=

# port
# such as 80 or 443
#port=80
port=

then run it:

nohup bash c.sh &

ssh.sh

ban ip according to the tried times noted on ssh login log file.

write value in the script file:

# log file
# centos: /var/log/secure
# debian: /var/log/auth.log
log_file=

# your public ip
public_ip=

# define max tried logined times
define=

then run it:

nohup bash ssh.sh &