Bind is the worldâ€™s most used DNS server. Keep reading to learn how to configure Bind9 to work with Malware Patrol’s data.
Malware Patrol provides a zone file compatible with Bind9. Its usage as a DNSBL (DNS black list) denies access to domains that are involved in malware and ransomware activities. DNS queries for malicious domains return the loopback address (127.0.0.1) preventing access to download malicious binaries, to relay stolen data and to contact command and control servers. You can follow these simple steps to configure your Bind9 instance and protect the internal network, computers and users from getting infected by malware.
Please be advised that we have noticed that Bind on CentOS 7 is somehow limited in the number of zones it can load and therefore doesnâ€™t work well with our block list. If you experience trouble loading the zone file, Bind exists unexpectedly, this may be the reason, contact our tech support.
1) Make sure your Bind9 is installed and working properly. There are several resources on the Internet that can help you install it depending on your platform. If you are experiencing trouble, start at: https://www.isc.org/downloads/bind/. You should also be able to use distribution specific tools like apt-get and yum. For example: apt-get install bind9.
2) Determine the path to the configuration files used by Bind9. This most likely will be /etc/bind or /etc/named. One way to find the path is to issue this command: find / -name named.conf
3) Notice: the path /etc/bind will be used throughout this how-to, please adapt the commands shown here appropriately if your path is different.
4) Change to the directory that contains Bind configuration files, for example: cd /etc/bind
5) Download Malware Patrolâ€™s zone file:
wget -O /etc/bind/blackhole.malwarepatrol.zone â€˜https://malwarepatrol.net/pub/20160707/blackhole.malwarepatrol.zoneâ€™
6) Add the following line to the end of the file /etc/bind/named.conf
7) Execute the first update:
/usr/bin/wget â€“no-check-certificate -qO- â€˜_URL_TO_BIND_BLOCK_LIST_â€™ | sed â€˜s/mbl.zone.file//etc/bind/blackhole.malwarepatrol.zone/gâ€™ > /etc/bind/blackhole.malwarepatrol.conf
notice 1: donâ€™t forget to change the command line if your path is not /etc/bind
notice 2: donâ€™t forget to change the _URL_TO_BIND_BLOCK_LIST_ paramenter to your custom URL. To find the correct address, log in to your account, right click on the â€œdownloadâ€ link for the Bind block list and choose â€œCopy link locationâ€
8) Restart Bind with the following command: service bind9 restart
9) Configure a new cronjob to update the Bind zone every hour:
MM * * * * /usr/bin/wget â€“no-check-certificate -qO- â€˜_URL_TO_BIND_BLOCK_LIST_â€™ | sed â€˜s/mbl.zone.file//etc/bind/blackhole.malwarepatrol.zone/gâ€™ > /etc/bind/blackhole.malwarepatrol.conf ; service bind9 restart
To make this set up effective, you should configure your customersâ€™ DNS server(s) to point to the new Bind. This can be easily achieved via DHCP. Still, customers may manually configure their systems to use external DNS servers, therefore bypassing this protection mechanism. To avoid that, apply firewall rules that properly deny traffic to external DNS servers.
If you experience any difficulties configuring Bind9 to use Malware Patrol, please make sure it is working properly and contact our tech support at support (@) malwarepatrol.net.
For other configuration guides, check out our Tech Support page.