December 18, 2009

hoHow to disable opendns.

The script below allows to disable opendns... place the output of the script at /etc/named.conf like this below.

options {
options {
directory "/var/named";
allow-recursion {
127.0.0.1;
xxx.xxx.xxx;
.... ....
.... ....
};
};



script -- >
=============================
echo "allow-recursion {"
echo "127.0.0.1;"
echo `/bin/hostname -i`\;
for i in `cat /etc/ips | cut -d ":" -f 1`
do
echo $i\;
done
for a in `cat /etc/resolv.conf | tr -s " " " " | cut -d " " -f2`
do
echo $a\;
done
echo "};"

No comments:

Post a Comment