fake dns

grep -i servername /etc/apache2/sites-enabled/*|tr -s " "|cut -f 3 -d\ |sort -u >/root/seznam_domen
cat /home/wd/seznam_domen |while read dom; do ./addfake.sh $dom; done

addfake.sh:

#!/bin/sh
CONF="/etc/bind/named.conf.local"
echo >> $CONF
echo 'zone "'$1'" {' >> $CONF
echo '	type master;' >> $CONF
echo '	file "fake.cz";' >> $CONF
echo '};' >> $CONF

/var/cache/bind/fake.cz

$TTL 3D
@   IN  SOA www.yo.cz.  hostmaster.panelnet.cz. (
            200903
            8H;
            2H;
            4W;
            1D;
            )
		NS	www.yo.cz.
		A	81.0.212.152
*		A	81.0.212.152
 
linux/apache/fakedns.txt · Last modified: 2009/03/07 17:07 by admin