Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1389 → Rev 1390

/alcasar.sh
1302,9 → 1302,9
rm -rf /tmp/nfsen-1.3.6p1/
} # End of nfsen ()
 
##########################################################
##################################################
## Function "dnsmasq" ##
##########################################################
##################################################
dnsmasq ()
{
[ -d /var/log/dnsmasq ] || mkdir /var/log/dnsmasq
1316,6 → 1316,7
# Configuration file for "dnsmasq in forward mode"
conf-file=$DIR_DEST_ETC/alcasar-dns-name # local DNS resolutions
listen-address=$PRIVATE_IP
pid-file=/var/run/dnsmasq.pid
listen-address=127.0.0.1
no-dhcp-interface=$INTIF
no-dhcp-interface=tun0
1339,10 → 1340,11
EOF
# 2nd dnsmasq listen on udp 54 ("dnsmasq with blacklist")
cat << EOF > /etc/dnsmasq-blacklist.conf
# Configuration file for "dnsmasq with blacklist"
# Configuration file for "dnsmasq with blacklist"
# Add Toulouse blacklist domains
conf-dir=$DIR_DEST_SHARE/dnsmasq-bl-enabled
conf-file=$DIR_DEST_ETC/alcasar-dns-name # local DNS resolutions
pid-file=/var/run/dnsmasq-blacklist.pid
listen-address=$PRIVATE_IP
port=54
no-dhcp-interface=$INTIF
1359,11 → 1361,12
EOF
# 3rd dnsmasq listen on udp 55 ("dnsmasq with whitelist")
cat << EOF > /etc/dnsmasq-whitelist.conf
# Configuration file for "dnsmasq with whitelist"
# Configuration file for "dnsmasq with whitelist"
# Inclusion de la whitelist <domains> de Toulouse dans la configuration
conf-dir=$DIR_DEST_SHARE/dnsmasq-wl-enabled
conf-file=$DIR_DEST_ETC/alcasar-dns-name # zone de definition de noms DNS locaux
listen-address=$PRIVATE_IP
pid-file=/var/run/dnsmasq-whitelist.pid
port=55
no-dhcp-interface=$INTIF
no-dhcp-interface=tun0
1375,6 → 1378,7
bogus-priv
filterwin2k
address=/#/$PRIVATE_IP
ipset=/#/whitelist_ip_allowed
EOF
# Start after chilli (which create tun0)
$SED "s?^After=.*?After=syslog.target network.target chilli.service?g" /lib/systemd/system/dnsmasq.service
1383,13 → 1387,9
cp -f /lib/systemd/system/dnsmasq.service /lib/systemd/system/dnsmasq-whitelist.service
$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/dnsmasq -C /etc/dnsmasq-blacklist.conf?g" /lib/systemd/system/dnsmasq-blacklist.service
$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/dnsmasq -C /etc/dnsmasq-whitelist.conf?g" /lib/systemd/system/dnsmasq-whitelist.service
<<<<<<< .mine
} # End of dnsmasq()
=======
$SED "s?^PIDFile=.*?PIDFile=/var/run/dnsmasq-blacklist.pid?g" /lib/systemd/system/dnsmasq-blacklist.service
$SED "s?^PIDFile=.*?PIDFile=/var/run/dnsmasq-whitelist.pid?g" /lib/systemd/system/dnsmasq-whitelist.service
} # End dnsmasq
>>>>>>> .r1387
 
##########################################################
## Fonction "BL" ##