/alcasar.sh |
---|
777,15 → 777,18 |
{ |
# modification du générateur du fichier de conf |
[ -e /etc/chilli/functions.default ] || cp /etc/chilli/functions /etc/chilli/functions.default |
# suppression du domaine "coova.org" dans la primitive uamallowed |
# suppression du domaine "coova.org" dans la primitive uamallowed |
$SED "s?www.coova.org,??g" /etc/chilli/functions |
# suppression de la primitive "uamanydns" |
# suppression de la primitive "uamanydns" |
$SED "s?uamanydns??g" /etc/chilli/functions |
# on fixe la socket de commande local (/var/run/chilli.sock) |
# on fixe la socket de commande local (/var/run/chilli.sock) |
$SED "s?^CMDSOCK=.*?CMDSOCK=\$RUN_D/chilli.sock?g" /etc/chilli/functions |
# modification du fichier d'initialisation (suppression du cron et correction de la procédure d'arret) |
# modification du fichier d'initialisation |
[ -e /etc/init.d/chilli.default ] || cp /etc/init.d/chilli /etc/init.d/chilli.default |
cp -f $DIR_CONF/chilli-init /etc/init.d/chilli |
# configuration d'eth1 (utile pour dhcpd)) |
$SED "s?ifconfig.*?ifconfig \$HS_LANIF $PRIVATE_IP?g" /etc/init.d/chilli |
# ajout de la fontion 'status' (utile pour la gestion du process) |
$SED "/^[\t ]*stop)/i\ status)\n status chilli\n RETVAL=$?\n ;;\n" /etc/init.d/chilli |
# création du fichier de conf |
cp /etc/chilli/defaults /etc/chilli/config |
$SED "s?^# HS_WANIF=.*?HF_WANIF=$EXTIF?g" /etc/chilli/config |
1129,13 → 1132,6 |
10 1 1 * * root /usr/bin/truncate_radacct > /dev/null 2>&1 |
15 1 1 * * root /usr/bin/clean_radacct > /dev/null 2>&1 |
EOF |
# réécriture du fichier cron de coova-chilli pour être cohérent avec l'architecture Alcasar (/etc/crond au lieu de /var/spool/cron/root). |
# sans mèl ( > /dev/null 2>&1) |
rm -f /var/spool/cron/root |
cat << EOF > /etc/cron.d/coova |
*/60 * * * * root /etc/init.d/chilli radconfig > /dev/null 2>&1 |
*/10 * * * * root /etc/init.d/chilli checkrunning > /dev/null 2>&1 |
EOF |
# activation du "chien de garde" (watchdog) toutes les 3' afin de déconnecter les usagers authentifiés dont la station est usurpée ou ne répond plus |
cat << EOF > /etc/cron.d/watchdog |
*/3 * * * * root $DIR_DEST_BIN/alcasar-watchdog.sh > /dev/null 2>&1 |
/conf/chilli-init |
---|
File deleted |
/conf/rpms/i586/coova-chilli-1.2.1-5mdv2010.0.i586.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/conf/rpms/i586/libchilli0-1.2.1-5mdv2010.0.i586.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/conf/rpms/i586/python-coova-chilli-1.2.1-5mdv2010.0.i586.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/conf/rpms/i586/lib64chilli0-1.2.2-1mdv2010.0.x86_64.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/conf/rpms/i586/python-coova-chilli-1.2.2-1mdv2010.0.i586.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/conf/rpms/i586/coova-chilli-1.2.2-1mdv2010.0.i586.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/conf/rpms/x86_64/lib64chilli0-1.2.1-1mdv2010.0.x86_64.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/conf/rpms/x86_64/python-coova-chilli-1.2.1-1mdv2010.0.x86_64.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/conf/rpms/x86_64/coova-chilli-1.2.1-1mdv2010.0.x86_64.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/conf/rpms/x86_64/python-coova-chilli-1.2.2-1mdv2010.0.x86_64.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/conf/rpms/x86_64/libchilli0-1.2.2-1mdv2010.0.i586.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/conf/rpms/x86_64/coova-chilli-1.2.2-1mdv2010.0.x86_64.rpm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/conf/sudoers |
---|
19,7 → 19,7 |
Cmnd_Alias SQL=/usr/local/sbin/alcasar-mysql.sh # pour exporter la base mysql |
Cmnd_Alias GHOST=/usr/local/bin/alcasar-mondo.sh # pour générer une image iso du serveur |
Cmnd_Alias EXPORT=/usr/local/bin/alcasar-log-export.sh # pour exporter/sauvegarder les fichiers journaux |
Cmnd_Alias BL=/usr/local/sbin/alcasar-bl.sh # pour gérer les blacklists et whitelist |
Cmnd_Alias BL=/usr/local/sbin/alcasar-bl.sh,/usr/local/sbin/alcasar-havp.sh # pour gérer le filtrage WEB (blacklists, whitelist et antivirus) |
Cmnd_Alias NF=/usr/local/sbin/alcasar-nf.sh # pour gérer le filtrage réseau |
Cmnd_Alias LOGOUT=/usr/local/sbin/alcasar-logout.sh # pour déconnecter les usagers |
Cmnd_Alias UAM=/usr/local/sbin/alcasar-uamallowed.sh # pour gérer les site de confiance (uamallowed) |
/gestion/admin/network.php |
---|
104,7 → 104,7 |
// Les actions sur un service |
//------------------------------- |
//sécurité sur les actions à réaliser |
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","named","sshd"); |
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","named","dhcpd","httpd","sshd"); |
$autorizeAction = array("start","stop","restart"); |
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) { |
123,6 → 123,8 |
$serviceStatus['mysqld'] = checkServiceStatus("mysqld","OK"); |
$serviceStatus['squid'] = checkServiceStatus("squid","pid"); |
$serviceStatus['named'] = checkServiceStatus("named","up"); |
$serviceStatus['dhcpd'] = checkServiceStatus("dhcpd","pid"); |
$serviceStatus['httpd'] = checkServiceStatus("httpd","pid"); |
$serviceStatus['sshd'] = checkServiceStatus("sshd","pid"); |
// Fonction de test de connectivité internet |
/gestion/admin/web_filter.php |
---|
6,7 → 6,6 |
<link rel="stylesheet" href="/css/style.css" type="text/css"> |
</HEAD> |
<body> |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0> |
<? |
# Choice of language |
$Language = 'en'; |
14,13 → 13,16 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); |
$Language = strtolower(substr(chop($Langue[0]),0,2)); } |
if($Language == 'fr'){ |
$l_title = "Filtrage WEB"; |
$l_title1 = "Antivirus"; |
$l_title2 = "Filtrage de noms de domaine et d'URL"; |
$l_antivir_on="L'antivirus de flux WEB est actuellement activé"; |
$l_antivir_off="L'antivirus de flux WEB est actuellement désactivé"; |
$l_webfilter_on="Le filtrage WEB est actuellement activé"; |
$l_webfilter_off="Le filtrage WEB est actuellement désactivé"; |
$l_switch_on="Activer le filtrage WEB"; |
$l_switch_off="Désactiver le filtrage WEB"; |
$l_comment_on="(la consultation WEB est filtrée selon les critères définis ci-dessous)"; |
$l_comment_off="(la consultation WEB est autorisée sans restriction)"; |
$l_switch_antivir_on="Activer l'antivirus"; |
$l_switch_antivir_off="Désactiver l'antivirus"; |
$l_switch_filtering_on="Activer le filtrage"; |
$l_switch_filtering_off="Désactiver le filtrage"; |
$l_main_bl="Liste noire principale (version actuelle : "; |
$l_download="Télécharger la dernière version"; |
$l_warning="<B>Attention</B> : ce téléchargement dure plusieurs minutes."; |
27,25 → 29,30 |
$l_secondary_bl="Liste noire et liste blanche secondaires"; |
} |
else { |
$l_title = "WEB Filter"; |
$l_title1 = "Antivirus"; |
$l_title2 = "Domain names and URL filtering"; |
$l_antivir_on="Actually, the antivirus is on"; |
$l_antivir_off="Actually, the antivirus is off"; |
$l_webfilter_on="Actually, the WEB filter is on"; |
$l_webfilter_off="Actually, the WEB filter is off"; |
$l_switch_on="Switch the WebFilter on"; |
$l_switch_off="Switch the WebFilter off"; |
$l_comment_on="(The WEB consultation is filtered as defined below)"; |
$l_comment_off="(The WEB consultation is allowed without any restriction)"; |
$l_switch_antivir_on="Switch the antivirus on"; |
$l_switch_antivir_off="Switch the antivirus off"; |
$l_switch_filtering_on="Switch the WebFilter on"; |
$l_switch_filtering_off="Switch the WebFilter off"; |
$l_main_bl="Main blacklist (current version : "; |
$l_download="Download the last version"; |
$l_warning="<B>Be carefull</B> : this download is estimate to fiew minutes."; |
$l_secondary_bl="Secondary blacklist and whitelist"; |
} |
echo " |
<tr><th>$l_title</th></tr> |
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=1 height=2></td></tr> |
</TABLE>"; |
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; } |
switch ($choix) |
{ |
case 'AV_On' : |
exec ("sudo /usr/local/sbin/alcasar-havp.sh -on"); |
break; |
case 'AV_Off' : |
exec ("sudo /usr/local/sbin/alcasar-havp.sh -off"); |
break; |
case 'BL_On' : |
exec ("sudo /usr/local/sbin/alcasar-bl.sh -on"); |
break; |
76,42 → 83,77 |
break; |
} |
?> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1> |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0> |
<tr><th><?php echo "$l_title1"; ?></th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width=1 height=2></td></tr> |
</TABLE> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0> |
<tr><td valign="middle" align="left"> |
<?php |
$pointeur = fopen("/etc/dansguardian/dansguardian.conf", "r"); |
$result = false; |
$result_antivir = false; $result_filter = false; $out=0; |
if ($pointeur) |
{ |
while (!feof($pointeur)) |
{ |
$ligne = fgets($pointeur); |
if (preg_match("/^proxyport = 8090/", $ligne, $r)) |
{ |
$result_antivir = true; |
$out++; |
} |
if (preg_match("/^reportinglevel = 3/", $ligne, $r)) |
{ |
$result = true; |
break; |
$result_filter = true; |
$out++; |
} |
if ($out == 2) break; |
} |
} |
fclose($pointeur); |
if ($result) |
if ($result_antivir) |
{ |
echo "<CENTER><H3>$l_webfilter_on</H3>$l_comment_on</CENTER>"; |
echo "<CENTER><H3>$l_antivir_on</H3></CENTER>"; |
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>"; |
echo "<input type=hidden name='choix' value=\"AV_Off\">"; |
echo "<input type=submit value=\"$l_switch_antivir_off\">"; |
} |
else |
{ |
echo "<CENTER><H3>$l_antivir_off</H3></CENTER>"; |
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>"; |
echo "<input type=hidden name='choix' value=\"AV_On\">"; |
echo "<input type=submit value=\"$l_switch_antivir_on\">"; |
} |
?> |
</FORM> |
</td></tr> |
</TABLE> |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0> |
<tr><th><?php echo "$l_title2"; ?></th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width=1 height=2></td></tr> |
</TABLE> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0> |
<tr><td valign="middle" align="left"> |
<?php |
if ($result_filter) |
{ |
echo "<CENTER><H3>$l_webfilter_on</H3></CENTER>"; |
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>"; |
echo "<input type=hidden name='choix' value=\"BL_Off\">"; |
echo "<input type=submit value=\"$l_switch_off\">"; |
echo "<input type=submit value=\"$l_switch_filtering_off\">"; |
} |
else |
{ |
echo "<CENTER><H3>$l_webfilter_off</H3>$l_comment_off</CENTER>"; |
echo "<CENTER><H3>$l_webfilter_off</H3></CENTER>"; |
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>"; |
echo "<input type=hidden name='choix' value=\"BL_On\">"; |
echo "<input type=submit value=\"$l_switch_on\">"; |
echo "<input type=submit value=\"$l_switch_filtering_on\">"; |
} |
echo "</FORM>"; |
echo "</td></tr>"; |
echo "</TABLE>"; |
if ($result) require ('web_filter2.php'); |
if ($result_filter) require ('web_filter2.php'); |
?> |
</BODY> |
</HTML> |
/gestion/admin/web_filter2.php |
---|
17,21 → 17,14 |
} |
} |
?> |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0> |
<tr><th> |
<? |
echo "$l_main_bl"; |
echo_file ("/var/www/html/VERSION-BL"); |
echo ")"; |
?> |
</th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr> |
</table> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td valign="middle" align="left"> |
<BR><FORM action='/admin/web_filter.php' method=POST> |
<FORM action='/admin/web_filter.php' method=POST> |
<input type='hidden' name='choix' value='MAJ_bl'> |
<?php |
echo "<center>$l_main_bl"; |
echo_file ("/var/www/html/VERSION-BL"); |
echo ")</center><BR>"; |
echo "<input type='submit' value='$l_download'>"; |
echo " ($l_warning)"; |
?> |
38,12 → 31,9 |
</FORM> |
</td></tr> |
</TABLE> |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0> |
<tr><th><?echo "$l_secondary_bl";?></th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr> |
</table> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td valign="middle" align="left"> |
<?echo "<center>$l_secondary_bl</center></td></tr>";?> |
<FORM action='/admin/web_filter.php' method='POST'> |
<TABLE cellspacing=2 cellpadding=3 border=1> |
<tr><td width=50% height=100% align=center> |
/gestion/phpsysinfo/includes/xml/portail.php |
---|
2,7 → 2,7 |
/*************************************************************************** |
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script * |
* http://phpsysinfo.sourceforge.net/ * |
* Copyright (C) 2010 by 3abtux & Rexy for ALCASAR * * |
* addons by 3abtux & Rexy for ALCASAR * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License, or * |
29,7 → 29,7 |
$host = "localhost"; |
$DB_USER = "radius"; |
$DB_RADIUS = "radius"; |
$radiuspwd = "W7AH5bp8"; |
$radiuspwd = "X01WDItQ"; |
// Connexion au serveur |
mysql_connect($host, $DB_USER,$radiuspwd) or die("erreur de connexion au serveur"); |
mysql_select_db($DB_RADIUS) or die("erreur de connexion a la base de donnees"); |
111,6 → 111,9 |
if (filtrageTest("/etc/dansguardian/dansguardian.conf","/^reportinglevel = 3/")){ |
$web_filter_status = $text['enable'];} |
else { $web_filter_status = $text['disable'];} |
if (filtrageTest("/etc/dansguardian/dansguardian.conf","/^proxyport = 8090/")){ |
$web_antivir_status = $text['enable'];} |
else { $web_antivir_status = $text['disable'];} |
if (InternetTest()){ |
$internet_status = "<img src='/images/state_ok.gif'>".$text['enable']; |
$version = dns_get_record("version.alcasar.info",DNS_TXT); |
137,14 → 140,18 |
. " <td><font size=\"-1\">" . $nbr_grp . "</font></td>\n" |
. " </tr>\n" |
. " <tr>\n" |
. " <td valign=\"top\"><font size=\"-1\">" . $text['net_filter'] . "</font></td>\n" |
. " <td><font size=\"-1\">" . $network_filter_status . "</font></td>\n" |
. " </tr>\n" |
. " <tr>\n" |
. " <td valign=\"top\"><font size=\"-1\">" . $text['web_filter'] . "</font></td>\n" |
. " <td><font size=\"-1\">antivirus : " . $web_antivir_status . ", domain/url : " . $web_filter_status . "</font></td>\n" |
. " </tr>\n" |
. " <tr>\n" |
. " <td valign=\"top\"><font size=\"-1\">" . $text['bl-version'] . "</font></td>\n" |
. " <td><font size=\"-1\">" . $VERSIONBL . "</font></td>\n" |
. " </tr>\n" |
. " <tr>\n" |
. " <td valign=\"top\"><font size=\"-1\">" . $text['filter'] . "</font></td>\n" |
. " <td><font size=\"-1\">web : " . $web_filter_status . ", " . $text['network'] . " : " . $network_filter_status . "</font></td>\n" |
. " </tr>\n" |
. " <tr>\n" |
. " <td valign=\"top\"><font size=\"-1\">" . $text['internet_link'] . "</font></td>\n" |
. " <td><font size=\"-1\">" . $internet_status . "</font></td>\n" |
. " </tr>\n" |
/gestion/phpsysinfo/includes/lang/fr.php |
---|
52,8 → 52,8 |
$text['internet_link'] = "Lien Internet"; |
$text['enable'] = "actif"; |
$text['disable'] = "inactif"; |
$text['filter'] = "filtrage"; |
$text['network'] = "réseau"; |
$text['web_filter'] = "Filtrage WEB"; |
$text['net_filter'] = "Filtrage protocoles réseau"; |
// |
$text['netusage'] = 'Réseau'; |
/gestion/phpsysinfo/includes/lang/en.php |
---|
52,8 → 52,8 |
$text['internet_link'] = "Internet connexion"; |
$text['enable'] = "enable"; |
$text['disable'] = "disable"; |
$text['filter'] = "filter"; |
$text['network'] = "network"; |
$text['web_filter'] = "WEB filtering"; |
$text['net_filter'] = "Network protocols filtering"; |
// |
$text['netusage'] = 'Network Usage'; |
62,8 → 62,6 |
$text['sent'] = 'Sent'; |
$text['errors'] = 'Err/Drop'; |
$text['connections'] = 'Established Network Connections'; |
$text['memusage'] = 'Memory Usage'; |
$text['phymem'] = 'Physical Memory'; |
$text['swap'] = 'Disk Swap'; |
116,4 → 114,5 |
$text['buffers'] = 'Buffers'; |
$text['cached'] = 'Cached'; |
$text['connections'] = 'Established Network Connections'; |
?> |