DNSBL Howto (DNS Black List)
yum install bind8 or bind9
讓它在開機時自動啟動
chkconfig --level 35 on
記錄查詢惡意網域的使用者
加入惡意網域檔案
vi /etc/named.conf
add two line
include "/etc/named.conf.local";
include "/var/named/malwaredomains.zones";
named.conf.local檔案內容, 把記錄送到syslogd
logging {
channel log_dns {
syslog local3;
print-category yes;
print-severity yes;
print-time no;
};
channel log_queries {
syslog local4;
print-category yes;
print-severity yes;
print-time no;
};
category default {log_dns;};
category queries {log_queries;};
category lame-servers { null;};
category edns-disabled { null; };
};
加入/var/named/blockeddomain.hosts
這個檔案會被malwaredomains.zones使用到
blockeddomain.hosts檔案內容
$TTL 86400 ; one day
@ IN SOA bhdns.mydomain.ca. bhdns.mydomain.ca. (
13101514; serial number YYMMDDNN
28800 ; refresh 8 hours
7200 ; retry 2 hours
864000 ; expire 10 days
86400 ) ; min ttl 1 day
NS bhdns.mydomain.ca.
A 127.0.0.1
* IN A 127.0.0.1
加入/etc/rsyslog.d/named.conf內容如下
!named
if $syslogfacility-text == 'local3' then /var/log/dns.log
& ~
if $syslogfacility-text == 'local4' then /var/log/dns_queries.log
& ~
service restart rsyslogd
service start named
讓它在開機時自動啟動
chkconfig --level 35 on
記錄查詢惡意網域的使用者
加入惡意網域檔案
vi /etc/named.conf
add two line
include "/etc/named.conf.local";
include "/var/named/malwaredomains.zones";
named.conf.local檔案內容, 把記錄送到syslogd
logging {
channel log_dns {
syslog local3;
print-category yes;
print-severity yes;
print-time no;
};
channel log_queries {
syslog local4;
print-category yes;
print-severity yes;
print-time no;
};
category default {log_dns;};
category queries {log_queries;};
category lame-servers { null;};
category edns-disabled { null; };
};
malwaredomains.zones
由http://www.malwaredomains.com/下載
這個檔案會被malwaredomains.zones使用到
blockeddomain.hosts檔案內容
$TTL 86400 ; one day
@ IN SOA bhdns.mydomain.ca. bhdns.mydomain.ca. (
13101514; serial number YYMMDDNN
28800 ; refresh 8 hours
7200 ; retry 2 hours
864000 ; expire 10 days
86400 ) ; min ttl 1 day
NS bhdns.mydomain.ca.
A 127.0.0.1
* IN A 127.0.0.1
加入/etc/rsyslog.d/named.conf內容如下
!named
if $syslogfacility-text == 'local3' then /var/log/dns.log
& ~
if $syslogfacility-text == 'local4' then /var/log/dns_queries.log
& ~
service restart rsyslogd
service start named
留言