This script helps to filter known malicious domains in Bind9 and keep config updated, preventing DNS spoofing and DNS hijacking.
- Update Files: Download the latest
blockeddomains.db
andblocked_domain_acl.conf
files from the remote repository. - Run DNS Filter: Apply the downloaded files to your Bind9 configuration.
- Check Configuration: Verify if Bind9 is installed and properly configured.
- Version Checking: Ensure that the local script version is up-to-date with the remote version.
- Linux-based OS (Tested on Debian, Ubuntu, CentOS, and RHEL).
- Bind9 installed.
- Curl for downloading files.
-r, --run
: Run the script to apply DNS filters.-u, --update [TARGET]
: Update the DNS files.all
: Update all files (blockeddomains.db
andblocked_domain_acl.conf
).zone
: Update only theblockeddomains.db
file.acl
: Update only theblocked_domain_acl.conf
file.
-c, --check
: Check if Bind9 is installed and properly configured.-h, --help
: Show this help message.
-
Run the script:
./bind_filter.sh -r
-
Update all files:
./bind_filter.sh -u all
-
Update only the zone file:
./bind_filter.sh -u zone
-
Update only the ACL file:
./bind_filter.sh -u acl
-
Check Bind9 configuration:
./bind_filter.sh -c
-
Clone this repository:
git clone https://github.com/percioandrade/bindfilter.git
-
Navigate to the script directory:
cd bindfilter
-
Make the script executable:
chmod +x bind_filter.sh
-
Run the script with the desired options:
sudo ./bind_filter.sh -r
-
Or you can run this script with command line
curl -s https://raw.githubusercontent.com/percioandrade/bindfilter/refs/heads/main/bind_filter.sh | bash -s -- -r
If you encounter any issues:
- Ensure that Bind9 and Curl are installed.
- Check the script's permissions.
- Verify the network connection for downloading files.
This project is licensed under the MIT License - see the LICENSE file for details.
Este script ajuda a filtrar domínios maliciosos conhecidos no Bind9 e manter a configuração atualizada, evitando falsificação e sequestro de DNS.
- Atualizar Arquivos: Baixar os arquivos mais recentes
blockeddomains.db
eblocked_domain_acl.conf
do repositório remoto. - Executar Filtro DNS: Aplicar os arquivos baixados na configuração do Bind9.
- Verificar Configuração: Verificar se o Bind9 está instalado e configurado corretamente.
- Verificação de Versão: Garantir que a versão local do script está atualizada com a versão remota.
- Sistema Operacional baseado em Linux (Testado no Debian, Ubuntu, CentOS e RHEL).
- Bind9 instalado.
- Curl para baixar os arquivos.
-r, --run
: Executar o script para aplicar os filtros DNS.-u, --update [TARGET]
: Atualizar os arquivos DNS.all
: Atualizar todos os arquivos (blockeddomains.db
eblocked_domain_acl.conf
).zone
: Atualizar apenas o arquivoblockeddomains.db
.acl
: Atualizar apenas o arquivoblocked_domain_acl.conf
.
-c, --check
: Verificar se o Bind9 está instalado e configurado corretamente.-h, --help
: Exibir esta mensagem de ajuda.
-
Executar o script:
./bind_filter.sh -r
-
Atualizar todos os arquivos:
./bind_filter.sh -u all
-
Atualizar apenas o arquivo de zona:
./bind_filter.sh -u zone
-
Atualizar apenas o arquivo de ACL:
./bind_filter.sh -u acl
-
Verificar a configuração do Bind9:
./bind_filter.sh -c
-
Clone este repositório:
git clone https://github.com/percioandrade/bindfilter.git
-
Navegue até o diretório do script:
cd bindfilter
-
Torne o script executável:
chmod +x bind_filter.sh
-
Execute o script com as opções desejadas:
sudo ./bind_filter.sh -r
-
Ou você pode executar este script com linha de comando
curl -s https://raw.githubusercontent.com/percioandrade/bindfilter/refs/heads/main/bind_filter.sh | bash -s -- -r
Se você encontrar problemas:
- Certifique-se de que o Bind9 e o Curl estão instalados.
- Verifique as permissões do script.
- Verifique a conexão de rede para o download dos arquivos.
This project is licensed under the GNU General Public License v2.0