Subversion Repositories ALCASAR

Rev

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

Rev 2947 Rev 2964
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-dns-local.sh 2947 2021-04-21 16:36:52Z rexy $
2
# $Id: alcasar-dns-local.sh 2964 2021-07-04 09:23:08Z rexy $
3
 
3
 
4
# alcasar-dns-local.sh
4
# alcasar-dns-local.sh
5
# by Rexy - 3abtux
5
# by Rexy - 3abtux
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 104... Line 104...
104
		;;
104
		;;
105
	--off-without-restart|-off-without-restart) # disable DNS redirector
105
	--off-without-restart|-off-without-restart) # disable DNS redirector
106
		#$SED "s?^#filterwin2k.*?filterwin2k?g" $DNSMASQ_CONF_FILE
106
		#$SED "s?^#filterwin2k.*?filterwin2k?g" $DNSMASQ_CONF_FILE
107
		rm -f $LOCAL_DOMAIN_CONF_FILE
107
		rm -f $LOCAL_DOMAIN_CONF_FILE
108
		$SED "s?^INT_DNS_ACTIVE.*?INT_DNS_ACTIVE=off?g" $ALCASAR_CONF_FILE
108
		$SED "s?^INT_DNS_ACTIVE.*?INT_DNS_ACTIVE=off?g" $ALCASAR_CONF_FILE
109
		restart_dns
-
 
110
		/usr/local/bin/alcasar-iptables.sh
109
		/usr/local/bin/alcasar-iptables.sh
111
		;;
110
		;;
112
	--on|-on) # enable DNS redirector
111
	--on|-on) # enable DNS redirector
113
		#$SED "s?^filterwin2k.*?#filterwin2k?g" $DNSMASQ_CONF_FILE
112
		#$SED "s?^filterwin2k.*?#filterwin2k?g" $DNSMASQ_CONF_FILE
114
		cat > $LOCAL_DOMAIN_CONF_FILE << EOF
113
		cat > $LOCAL_DOMAIN_CONF_FILE << EOF
Line 117... Line 116...
117
forward-zone:
116
forward-zone:
118
	name: "$INT_DNS_DOMAIN."
117
	name: "$INT_DNS_DOMAIN."
119
	forward-addr: $INT_DNS_IP
118
	forward-addr: $INT_DNS_IP
120
EOF
119
EOF
121
		$SED "s?^INT_DNS_ACTIVE.*?INT_DNS_ACTIVE=on?g" $ALCASAR_CONF_FILE
120
		$SED "s?^INT_DNS_ACTIVE.*?INT_DNS_ACTIVE=on?g" $ALCASAR_CONF_FILE
-
 
121
		restart_dns
122
		/usr/local/bin/alcasar-iptables.sh
122
		/usr/local/bin/alcasar-iptables.sh
123
		;;
123
		;;
124
	--on-without-restart|-on-without-restart) # enable DNS redirector
124
	--on-without-restart|-on-without-restart) # enable DNS redirector
125
		#$SED "s?^filterwin2k.*?#filterwin2k?g" $DNSMASQ_CONF_FILE
125
		#$SED "s?^filterwin2k.*?#filterwin2k?g" $DNSMASQ_CONF_FILE
126
		cat > $LOCAL_DOMAIN_CONF_FILE << EOF
126
		cat > $LOCAL_DOMAIN_CONF_FILE << EOF