修改病毒扫描时间为凌晨
This commit is contained in:
parent
5f1c1af36b
commit
da8473a3ec
23
README.md
23
README.md
@ -1,6 +1,8 @@
|
|||||||
# denyhosts
|
# denyhosts
|
||||||
|
|
||||||
- 拒绝主机&杀毒
|
- 拒绝主机&杀毒
|
||||||
```
|
|
||||||
|
```text
|
||||||
适用系统:
|
适用系统:
|
||||||
Debian 11
|
Debian 11
|
||||||
Centos 7
|
Centos 7
|
||||||
@ -9,7 +11,8 @@
|
|||||||
支持钉钉告警和邮件告
|
支持钉钉告警和邮件告
|
||||||
支持第三方QQ邮箱告警
|
支持第三方QQ邮箱告警
|
||||||
```
|
```
|
||||||
```
|
|
||||||
|
```text
|
||||||
Debian
|
Debian
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
apt -y install libclamav-dev libip4tc-dev libcurl4-openssl-dev #(或者libcurl4-gnutls-dev)
|
apt -y install libclamav-dev libip4tc-dev libcurl4-openssl-dev #(或者libcurl4-gnutls-dev)
|
||||||
@ -26,7 +29,7 @@ Debian
|
|||||||
update-alternatives --set ebtables /usr/sbin/ebtables-legacy
|
update-alternatives --set ebtables /usr/sbin/ebtables-legacy
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```text
|
||||||
Centos 7
|
Centos 7
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
yum install clamav clamav-update clamav-lib clamav-devel json-c-devel pcre2-devel
|
yum install clamav clamav-update clamav-lib clamav-devel json-c-devel pcre2-devel
|
||||||
@ -43,10 +46,7 @@ Centos 7
|
|||||||
freshclam # 更新病毒库(必要)
|
freshclam # 更新病毒库(必要)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```text
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
用法
|
用法
|
||||||
cd /root
|
cd /root
|
||||||
git clone https://git.aixiao.me/aixiao/denyhosts
|
git clone https://git.aixiao.me/aixiao/denyhosts
|
||||||
@ -72,8 +72,7 @@ killall rhost
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```text
|
||||||
```
|
|
||||||
配置文件
|
配置文件
|
||||||
global {
|
global {
|
||||||
|
|
||||||
@ -91,7 +90,7 @@ global {
|
|||||||
|
|
||||||
CLAMAV = 1; // clamav 是否扫描病毒(1开启,非1关闭)
|
CLAMAV = 1; // clamav 是否扫描病毒(1开启,非1关闭)
|
||||||
CLAMAV_ARG = "-r / --exclude-dir=^/sys|^/dev|^/proc|^/opt/infected|^/root|^/home|^/mnt|^/usr|^/var --move=/opt/infected --max-filesize 1024M -l clamscan.log";
|
CLAMAV_ARG = "-r / --exclude-dir=^/sys|^/dev|^/proc|^/opt/infected|^/root|^/home|^/mnt|^/usr|^/var --move=/opt/infected --max-filesize 1024M -l clamscan.log";
|
||||||
CLAMAV_TIME = "* 35 16 * * *"; // clamav 扫描时间(Cron格式, 秒 分 时 天 月 周)
|
CLAMAV_TIME = "* 1 4 * * *"; // clamav 扫描时间(Cron格式, 秒 分 时 天 月 周)
|
||||||
|
|
||||||
|
|
||||||
IPV4_RESTRICTION = 1; // 是否启用IP白名单(1开启,非1关闭)
|
IPV4_RESTRICTION = 1; // 是否启用IP白名单(1开启,非1关闭)
|
||||||
@ -99,8 +98,8 @@ global {
|
|||||||
|
|
||||||
|
|
||||||
REGION = 1; // 是否启用地域白名单(1开启,非1关闭)
|
REGION = 1; // 是否启用地域白名单(1开启,非1关闭)
|
||||||
IP2REGION = 1; // 是否使用 ip2region 地址定位库(1使用,非1不使用)
|
IP2REGION = 1; // 是否使用本地 ip2region 地址定位库(1使用,非1不使用)
|
||||||
//REGION_URL = "http://opendata.baidu.com/api.php?query=%s&co=&resource_id=6006&oe=utf8"; // 获取IP地域
|
//REGION_URL = "http://opendata.baidu.com/api.php?query=%s&co=&resource_id=6006&oe=utf8"; // 获取IP地域(aliyun付费API, 弃用)
|
||||||
REGION_URL = "https://api01.aliyun.venuscn.com/ip?ip=%s -H Authorization:APPCODE a1d842b8afda418c8ea24271a4e16b1f";
|
REGION_URL = "https://api01.aliyun.venuscn.com/ip?ip=%s -H Authorization:APPCODE a1d842b8afda418c8ea24271a4e16b1f";
|
||||||
REGION_LIST = "河南 郑州 上海"; // 地域列表(空格隔开)
|
REGION_LIST = "河南 郑州 上海"; // 地域列表(空格隔开)
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ global {
|
|||||||
|
|
||||||
CLAMAV = 1; // clamav 是否扫描病毒(1开启,非1关闭)
|
CLAMAV = 1; // clamav 是否扫描病毒(1开启,非1关闭)
|
||||||
CLAMAV_ARG = "-r / --exclude-dir=^/sys|^/dev|^/proc|^/opt/infected|^/root|^/home|^/mnt|^/usr|^/var --move=/opt/infected --max-filesize 1024M -l clamscan.log";
|
CLAMAV_ARG = "-r / --exclude-dir=^/sys|^/dev|^/proc|^/opt/infected|^/root|^/home|^/mnt|^/usr|^/var --move=/opt/infected --max-filesize 1024M -l clamscan.log";
|
||||||
CLAMAV_TIME = "* 35 16 * * *"; // clamav 扫描时间(Cron格式, 秒 分 时 天 月 周)
|
CLAMAV_TIME = "* 1 4 * * *"; // clamav 扫描时间(Cron格式, 秒 分 时 天 月 周)
|
||||||
|
|
||||||
|
|
||||||
IPV4_RESTRICTION = 1; // 是否启用IP白名单(1开启,非1关闭)
|
IPV4_RESTRICTION = 1; // 是否启用IP白名单(1开启,非1关闭)
|
||||||
|
Loading…
Reference in New Issue
Block a user