our cacti installation has internet access only via http proxy, so the oui database refresh doesn´t work.
I patched mactrack_functions.php and hardcoded the proxy. Replace the following line in function import_oui_database:
Code: Select all
$oui_database = file($oui_file);
Code: Select all
/* ######################################################## */
/* proxy hack
/* -------------------------------------------------------- */
$rd_proxy = "tcp://10.10.10.1:3128";
$rd_proxy_context = "";
$rd_proxy_context = stream_context_create(Array(
"http" => Array(
"proxy" => $rd_proxy,
"request_fulluri" => true)
)
);
$oui_database = file($oui_file,false,$rd_proxy_context);
if ($type != "ui") print "<tr><td>";
echo "Proxy for OUI Database Download $rd_proxy\n";
/* ######################################################## */
I am not a PHP programmer, so somebody should do this right (configurable, authentication ?). This hack works with Mactrack 2.9, PHP 5.2.12 and Cacti 0.8.8b.