Subversion Repositories ALCASAR

Rev

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

Rev 2488 Rev 2491
Line 33... Line 33...
33
	$l_dnsmasq_whitelist	= "Serveur DNS pour la Whitelist";
33
	$l_dnsmasq_whitelist	= "Serveur DNS pour la Whitelist";
34
	$l_dnsmasq_blackhole	= "Serveur DNS 'trou noir'";
34
	$l_dnsmasq_blackhole	= "Serveur DNS 'trou noir'";
35
	$l_ulogd_ssh		= "journalisation des accès par SSH";
35
	$l_ulogd_ssh		= "journalisation des accès par SSH";
36
	$l_ulogd_ext_access	= "journalisation des tentatives d'accès externes";
36
	$l_ulogd_ext_access	= "journalisation des tentatives d'accès externes";
37
	$l_ulogd_traceability	= "journalisation des connexions WEB filtrés";
37
	$l_ulogd_traceability	= "journalisation des connexions WEB filtrés";
-
 
38
	$l_nfsen		= ""; // TODO
-
 
39
	$l_fail2ban		= ""; // TODO
-
 
40
	$l_vnstat		= ""; // TODO
38
	$l_execute		= "Exécuter";
41
	$l_execute		= "Exécuter";
39
	$l_stop_restart		= "Arret et redémarrage du système";
42
	$l_stop_restart		= "Arret et redémarrage du système";
40
	$l_halt			= "Arréter le système";
43
	$l_halt			= "Arréter le système";
41
	$l_reboot		= "Relancer le système";
44
	$l_reboot		= "Relancer le système";
42
} else {
45
} else {
Line 67... Line 70...
67
	$l_dnsmasq_whitelist	= "DNS server for the Whitelist";
70
	$l_dnsmasq_whitelist	= "DNS server for the Whitelist";
68
	$l_dnsmasq_blackhole	= "DNS server (blackhole)";
71
	$l_dnsmasq_blackhole	= "DNS server (blackhole)";
69
	$l_ulogd_ssh		= "SSH access logging process";
72
	$l_ulogd_ssh		= "SSH access logging process";
70
	$l_ulogd_ext_access	= "Extern access attempts logging process";
73
	$l_ulogd_ext_access	= "Extern access attempts logging process";
71
	$l_ulogd_traceability	= "Filtering WEB access logging process";
74
	$l_ulogd_traceability	= "Filtering WEB access logging process";
-
 
75
	$l_nfsen		= ""; // TODO
-
 
76
	$l_fail2ban		= ""; // TODO
-
 
77
	$l_vnstat		= ""; // TODO
72
	$l_execute		= "Execute";
78
	$l_execute		= "Execute";
73
	$l_stop_restart		= "Halt and restart the system";
79
	$l_stop_restart		= "Halt and restart the system";
74
	$l_halt			= "Halt le system";
80
	$l_halt			= "Halt le system";
75
	$l_reboot		= "Restart the system";
81
	$l_reboot		= "Restart the system";
76
}
82
}
Line 128... Line 134...
128
 
134
 
129
//-------------------------------
135
//-------------------------------
130
// Actions on services
136
// Actions on services
131
//-------------------------------
137
//-------------------------------
132
//sécurité sur les actions à réaliser
138
//sécurité sur les actions à réaliser
133
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","lighttpd","sshd","freshclam","ntpd","havp","tinyproxy","dnsmasq","dnsmasq-blacklist","dnsmasq-whitelist","dnsmasq-blackhole");
139
$autorizeService = ['radiusd','chilli','dansguardian','mysqld','lighttpd','sshd','freshclam','ntpd','havp','tinyproxy','dnsmasq','dnsmasq-blacklist','dnsmasq-whitelist','dnsmasq-blackhole', 'ulogd-ssh', 'ulogd-ext-access', 'ulogd-traceability','nfsen','fail2ban','vnstat'];
134
$autorizeAction = array("start","stop","restart");
140
$autorizeAction = ['start','stop','restart'];
135
 
141
 
136
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
142
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
137
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
143
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
138
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
144
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
139
		// execStatus non exploité
145
		// execStatus non exploité
Line 166... Line 172...
166
$MainServiceStatus['lighttpd'] = checkServiceStatus("lighttpd");
172
$MainServiceStatus['lighttpd'] = checkServiceStatus("lighttpd");
167
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
173
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
168
$MainServiceStatus['ulogd_ssh'] = checkServiceStatus("ulogd-ssh");
174
$MainServiceStatus['ulogd_ssh'] = checkServiceStatus("ulogd-ssh");
169
$MainServiceStatus['ulogd_ext_access'] = checkServiceStatus("ulogd-ext-access");
175
$MainServiceStatus['ulogd_ext_access'] = checkServiceStatus("ulogd-ext-access");
170
$MainServiceStatus['ulogd_traceability'] = checkServiceStatus("ulogd-traceability");
176
$MainServiceStatus['ulogd_traceability'] = checkServiceStatus("ulogd-traceability");
-
 
177
$MainServiceStatus['nfsen'] = checkServiceStatus("nfsen");
-
 
178
$MainServiceStatus['fail2ban'] = checkServiceStatus("fail2ban");
-
 
179
$MainServiceStatus['vnstat'] = checkServiceStatus("vnstat");
171
 
180
 
172
$FilterServiceStatus = array();
181
$FilterServiceStatus = array();
173
$FilterServiceStatus['dnsmasq_blacklist'] = checkServiceStatus("dnsmasq-blacklist");
182
$FilterServiceStatus['dnsmasq_blacklist'] = checkServiceStatus("dnsmasq-blacklist");
174
$FilterServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
183
$FilterServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
175
$FilterServiceStatus['dnsmasq_blackhole'] = checkServiceStatus("dnsmasq-blackhole");
184
$FilterServiceStatus['dnsmasq_blackhole'] = checkServiceStatus("dnsmasq-blackhole");