docs: move cron guide to wiki

- https://gitlab.com/malware-filter/malware-filter/wikis/update-filter
- also include systemd timer
This commit is contained in:
Ming Di Leom 2022-12-17 04:08:49 +00:00
parent c838e8bb44
commit 7680f3589f
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 10 additions and 52 deletions

View File

@ -161,21 +161,11 @@ This blocklist includes domains only.
This blocklist includes domains only.
### Install
Save the ruleset to "/usr/local/etc/dnsmasq/vn-badsite-filter-dnsmasq.conf". Refer to this [guide](https://gitlab.com/malware-filter/malware-filter/wikis/update-filter) for auto-update.
```
# Create a new folder to store the blocklist
mkdir -p /usr/local/etc/dnsmasq/
Configure dnsmasq to use the blocklist:
# Create a new cron job for daily update
printf '#!/bin/sh\ncurl -L "https://malware-filter.gitlab.io/malware-filter/vn-badsite-filter-dnsmasq.conf" -o "/usr/local/etc/dnsmasq/vn-badsite-filter-dnsmasq.conf"\n' > /etc/cron.daily/vn-badsite-filter
# cron job requires execution permission
chmod 755 /etc/cron.daily/vn-badsite-filter
# Configure dnsmasq to use the blocklist
printf "\nconf-file=/usr/local/etc/dnsmasq/vn-badsite-filter-dnsmasq.conf\n" >> /etc/dnsmasq.conf
```
`printf "\nconf-file=/usr/local/etc/dnsmasq/vn-badsite-filter-dnsmasq.conf\n" >> /etc/dnsmasq.conf`
- https://malware-filter.gitlab.io/malware-filter/vn-badsite-filter-dnsmasq.conf
@ -194,21 +184,11 @@ printf "\nconf-file=/usr/local/etc/dnsmasq/vn-badsite-filter-dnsmasq.conf\n" >>
This blocklist includes domains only.
### Install
Save the ruleset to "/usr/local/etc/bind/vn-badsite-filter-bind.conf". Refer to this [guide](https://gitlab.com/malware-filter/malware-filter/wikis/update-filter) for auto-update.
```
# Create a new folder to store the blocklist
mkdir -p /usr/local/etc/bind/
Configure BIND to use the blocklist:
# Create a new cron job for daily update
printf '#!/bin/sh\ncurl -L "https://malware-filter.gitlab.io/malware-filter/vn-badsite-filter-bind.conf" -o "/usr/local/etc/bind/vn-badsite-filter-bind.conf"\n' > /etc/cron.daily/vn-badsite-filter
# cron job requires execution permission
chmod 755 /etc/cron.daily/vn-badsite-filter
# Configure BIND to use the blocklist
printf '\ninclude "/usr/local/etc/bind/vn-badsite-filter-bind.conf";\n' >> /etc/bind/named.conf
```
`printf '\ninclude "/usr/local/etc/bind/vn-badsite-filter-bind.conf";\n' >> /etc/bind/named.conf`
Add this to "/etc/bind/null.zone.file" (skip this step if the file already exists):
@ -262,21 +242,11 @@ This blocklist includes domains only.
This blocklist includes domains only.
### Install
Save the rulesets to "/usr/local/etc/unbound/vn-badsite-filter-unbound.conf". Refer to this [guide](https://gitlab.com/malware-filter/malware-filter/wikis/update-filter) for auto-update.
```
# Create a new folder to store the blocklist
mkdir -p /usr/local/etc/unbound/
Configure Unbound to use the blocklist:
# Create a new cron job for daily update
printf '#!/bin/sh\ncurl -L "https://malware-filter.gitlab.io/malware-filter/vn-badsite-filter-unbound.conf" -o "/usr/local/etc/unbound/vn-badsite-filter-unbound.conf"\n' > /etc/cron.daily/vn-badsite-filter
# cron job requires execution permission
chmod 755 /etc/cron.daily/vn-badsite-filter
# Configure Unbound to use the blocklist
printf '\n include: "/usr/local/etc/unbound/vn-badsite-filter-unbound.conf"\n' >> /etc/unbound/unbound.conf
```
`printf '\n include: "/usr/local/etc/unbound/vn-badsite-filter-unbound.conf"\n' >> /etc/unbound/unbound.conf`
- https://malware-filter.gitlab.io/malware-filter/vn-badsite-filter-unbound.conf
@ -293,19 +263,7 @@ printf '\n include: "/usr/local/etc/unbound/vn-badsite-filter-unbound.conf"\n'
## dnscrypt-proxy
### Install
```
# Create a new folder to store the blocklist
mkdir -p /etc/dnscrypt-proxy/
# Create a new cron job for daily update
printf '#!/bin/sh\ncurl -L "https://malware-filter.gitlab.io/malware-filter/vn-badsite-filter-dnscrypt-blocked-names.txt" -o "/etc/dnscrypt-proxy/vn-badsite-filter-dnscrypt-blocked-names.txt"\n' > /etc/cron.daily/vn-badsite-filter
printf '\ncurl -L "https://malware-filter.gitlab.io/malware-filter/vn-badsite-filter-dnscrypt-blocked-ips.txt" -o "/etc/dnscrypt-proxy/vn-badsite-filter-dnscrypt-blocked-ips.txt"\n' >> /etc/cron.daily/vn-badsite-filter
# cron job requires execution permission
chmod 755 /etc/cron.daily/vn-badsite-filter
```
Save the rulesets to "/etc/dnscrypt-proxy/". Refer to this [guide](https://gitlab.com/malware-filter/malware-filter/wikis/update-filter) for auto-update.
Configure dnscrypt-proxy to use the blocklist: