Subversion Repositories ALCASAR

Rev

Rev 65 | Rev 70 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 65 Rev 68
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 65 2010-04-08 21:32:15Z richard $ 
2
#  $Id: alcasar.sh 68 2010-04-14 19:50:46Z franck $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 984... Line 984...
984
	[ -e /var/lib/named/etc/trusted_networks_acl.conf.default  ] || cp /var/lib/named/etc/trusted_networks_acl.conf /var/lib/named/etc/trusted_networks_acl.conf.default
984
	[ -e /var/lib/named/etc/trusted_networks_acl.conf.default  ] || cp /var/lib/named/etc/trusted_networks_acl.conf /var/lib/named/etc/trusted_networks_acl.conf.default
985
	[ -e /var/lib/named/etc/named.conf.default  ] || cp /var/lib/named/etc/named.conf /var/lib/named/etc/named.conf.default
985
	[ -e /var/lib/named/etc/named.conf.default  ] || cp /var/lib/named/etc/named.conf /var/lib/named/etc/named.conf.default
986
	[ -e /var/lib/named/var/named/master/localdomain.zone.default  ] || cp /var/lib/named/var/named/master/localdomain.zone /var/lib/named/var/named/master/localdomain.zone.default
986
	[ -e /var/lib/named/var/named/master/localdomain.zone.default  ] || cp /var/lib/named/var/named/master/localdomain.zone /var/lib/named/var/named/master/localdomain.zone.default
987
	$SED "s?127.0.0.1;.*?127.0.0.1; $CUSTOM_PRIVATE_NETWORK_MASK;?g" /var/lib/named/etc/trusted_networks_acl.conf
987
	$SED "s?127.0.0.1;.*?127.0.0.1; $CUSTOM_PRIVATE_NETWORK_MASK;?g" /var/lib/named/etc/trusted_networks_acl.conf
988
	$SED "s?listen-on.*?listen-on port 53 \{ 127.0.0.1; $PRIVATE_IP; \};?g" /var/lib/named/etc/named.conf
988
	$SED "s?listen-on.*?listen-on port 53 \{ 127.0.0.1; $PRIVATE_IP; \};?g" /var/lib/named/etc/named.conf
989
	$SED "s?^\/\/[ ]*forwarders.*?    forward only; forwarders { $DNS1; $DNS2; };?g" /var/lib/named/etc/named.conf
989
	$SED "s?^\/\/[ ]*forwarders.*?    forward only; forwarders { ${DNS1:=208.67.222.222}; ${DNS2:=208.67.220.220}; };?g" /var/lib/named/etc/named.conf
990
#	$SED "s?^\/\/ include \"\/etc\/bogon_acl.conf\";.*?include \"\/etc\/bogon_acl.conf\";?g" /var/lib/named/etc/named.conf
990
#	$SED "s?^\/\/ include \"\/etc\/bogon_acl.conf\";.*?include \"\/etc\/bogon_acl.conf\";?g" /var/lib/named/etc/named.conf
991
# On crée l'entrée pour le reverse
991
# On crée l'entrée pour le reverse
992
	for i in $(seq $classe -1 1)
992
	for i in $(seq $classe -1 1)
993
	do
993
	do
994
		echo -n `echo $PRIVATE_NETWORK|cut -d"." -f$i`. >> /tmp/rev.txt
994
		echo -n `echo $PRIVATE_NETWORK|cut -d"." -f$i`. >> /tmp/rev.txt