Skip to content

nanqinlang-script/defender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 &

About

simple scripts to provide defence

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages