一、安装
yum -y install bind
yum -y install bind-chroot
二、生成key
/usr/sbin/dnssec-keygen -a hmac-md5 -b 128 -n user rndc
cat Krndc.+157+13538.*
将生成串更新/etc/rndc.key中secret的值。
三、配制
#/var/named/chroot/etc/named.conf
// Default named.conf generated by install of bind-9.2.4-28.el4
options {
directory "/var/named";
pid-file "/var/run/named/named.pid";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
Allow-transfer {tran;};
};
acl tran {192.168.0.174;};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone"hk.hn"{
type master;
file "hk.hn";
allow-transfer {192.168.100.174;};
};
include "/etc/rndc.key";
#cd /etc
#ln -s /var/named/chroot/etc/named.conf named.conf
yum -y install bind
yum -y install bind-chroot
二、生成key
/usr/sbin/dnssec-keygen -a hmac-md5 -b 128 -n user rndc
cat Krndc.+157+13538.*
将生成串更新/etc/rndc.key中secret的值。
三、配制
#/var/named/chroot/etc/named.conf
引用
// Default named.conf generated by install of bind-9.2.4-28.el4
options {
directory "/var/named";
pid-file "/var/run/named/named.pid";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
Allow-transfer {tran;};
};
acl tran {192.168.0.174;};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone"hk.hn"{
type master;
file "hk.hn";
allow-transfer {192.168.100.174;};
};
include "/etc/rndc.key";
#cd /etc
#ln -s /var/named/chroot/etc/named.conf named.conf
一、下载ISAPI_REWRITE并安装
二、修改httpd.ini
RewriteCond Host: (img\.abc\.cn)
RewriteCond Referer: (?!http://\1.*).*
RewriteCond Referer: (?!http://(?:.*\.baidu\.com|baidu\.com|.*
\.google\.net|google\.net|.*\.sohu\.com|sohu\.com)).+
RewriteRule .*\.(?:jpg|gif|bmp) /block.gif [I,O,N]
三、上传/block.gif文件到在虚拟主机img.abc.cn站点根目录下.
四、在IIS中修改?block.gif属性->http头->启用内容失效->立即过期
五、重启IIS完毕。
注:当从限制访问到允许访问,发现在IE下可以立即过期,firefox就不行。
二、修改httpd.ini
引用
RewriteCond Host: (img\.abc\.cn)
RewriteCond Referer: (?!http://\1.*).*
RewriteCond Referer: (?!http://(?:.*\.baidu\.com|baidu\.com|.*
\.google\.net|google\.net|.*\.sohu\.com|sohu\.com)).+
RewriteRule .*\.(?:jpg|gif|bmp) /block.gif [I,O,N]
三、上传/block.gif文件到在虚拟主机img.abc.cn站点根目录下.
四、在IIS中修改?block.gif属性->http头->启用内容失效->立即过期
五、重启IIS完毕。
注:当从限制访问到允许访问,发现在IE下可以立即过期,firefox就不行。