This is a post to cover off a few issues I encountered trying to build an ntopng server on CentOS 6.5

Firstly, you need to install the EPEL 6 repository.

yum -y install http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Then you need to add the ntop repository (manually)

vi /etc/yum.repos.d/ntop.repo

[ntop]
name=ntop packages
baseurl=http://www.nmon.net/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.nmon.net/centos/RPM-GPG-KEY-deri

Update your repositories and install ntopng and its dependencies

yum clean all
yum update
yum install pfring n2disk nProbe ntopng ntopng-data nbox

*Note: At this point I had a Transaction Check error because my kernel was newer than what the ntop compile expected, so I had to install an older kernel for the yum install to complete. If the above completes without an error you can skip this step, else grab the older kernel and try the package install again.

yum -y install kernel-2.6.32.431.20.3.el6

Once installed, you want to edit the configuration files.

vi /etc/ntopng/ntopng.start

--local-networks "192.168.0.0/24"
--interface 0

and copy the default configuration

cp /etc/ntopng/ntopng.conf.sample /etc/ntopng/ntopng.conf

You’re pretty much done, except for a bit of housekeeping.

Set the services to start automatically.

chkconfig redis on
chkconfig ntopng on

Add an exception to the firewall

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT

Restart the firewall

service iptables restart

and Start the ntopng services…

service redis start
service ntopng start

Done!

Browse to the server http://youserver:3000
Login with admin/admin

Thanks to RedBranch, Nmon and others for helping me piece this together.

Installing a WIMP server just got heaps easier thanks to the Microsoft Web Platform Installer.

Go grab it, run it on your Server 2012R2 instance and install the PHP 5.5.3 and MySQL components.

It will setup your IIS install with PHP, FastCGI module and WinCache extensions and save you heaps of time and fuss. The PHP management addin for IIS Management Console is a nice touch also, as you can change all the php.ini parameters, enable/disable extensions etc. right in the management GUI.

The only catch I found was that the PHP binaries and FastCGI module need the x86 and x64 Visual C++ Runtimes, which the WebPI installer doesn’t fetch? Anyway, grab them as well and you should be good to go.

Here’s a snippet of PHP Code I’ve been using to interrogate our switches SNMP data for graphing.

<?php
/* HP MSM Controller */
$ip = '10.0.0.1';
$oid = 'iso.3.6.1.4.1.8744.5.23.1.2.1.1'; //ap's

/* HP Procurve Switch */
//$ip = '10.0.0.2';
//$oid = 'iso.3.6.1.2.1.2.2.1.2'; //ports
//$oid = 'iso.3.6.1.2.1.2.2.1.10'; //inoct
//$oid = 'iso.3.6.1.2.1.2.2.1.16'; //outoct

/* SNMP Tree Walk */
$res = snmp2_real_walk($ip,'public',$oid);
while (list($key, $data) = each($res)){
 list($attr,$int) = explode('.',substr($key,strlen($oid)+1));
 $group[$int][$attr] = $data;
}

/* SNMP Value fetch example (Switch Port Traffic In/Out) */
/*
snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
$desc = snmp2_get($ip,"public","iso.3.6.1.2.1.2.2.1.2.".$port,300);
$inoct = snmp2_get($ip,"public","iso.3.6.1.2.1.2.2.1.10.".$port,300);
$outoct = snmp2_get($ip,"public","iso.3.6.1.2.1.2.2.1.16.".$port,300);
*/

?>
<pre><?php 
 print_r($res); // Raw result
// print_r($group); // Parsed Array
?></pre>


 

If you need to add a 3rd Party SSL certificate to Windows for whatever reason (Exchange, IIS, TLS, SSL, SFTP, NAP, RAS, etc.) here’s how you can go about getting one ready to use.

Of course, First you’ll need to go buy a valid certificate from your friendly neighbourhood provider.

I can recommend RapidSSL, they’re backed by GeoTrust, recognised by 99.9% of devices and are cheap as chips. Especially for wildcard domains.

Anyway, once you’ve got confirmation you can proceed with generating a Certificate Signing Request (CSR).

Read the rest of this entry »

Brew In A Bag

Someone asked me how I brew my beer. The answer being; I make my own malt extracts by mashing grains – and keep everything simple by doing it all in one pot (mash tun) using the ‘Brew in a Bag’ method.

I’m by no means an expert at this but this method makes great beer and it’s no hassle once you have the routine down.

Equipment:

1x 20L or larger Pot (preferably with temp gauge fitted)
1x Large Nylon bag
1x Cooling coil
1x 4L Bottle (or equivalent water containers)

Read the rest of this entry »

The first thing I say to anyone trying to better their understanding of photography is to first stop and consider what it is they are actually doing.

Photography = from the greek photos (light) and graphos (writing or painting).

Photography is the process of painting with light.

Whether you have a lot of light, or barely any at all; will dictate entirely the kinds of images you can produce. Understanding the light in your environment and how light works inside the camera is paramount to being able to select the right mode/settings and achieve the kind of shot you want.

Read the rest of this entry »

While CentOS’ default repository comes with heaps of useful services, there is more value to be added by adding the Extra Packages for Enterprise Linux repository as well.

Adding the repository is easy…

yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

A list of the EPEL (x86_64) packages can be found here, but some of the more popular ones you might be interested in, include…

  • phpMyAdmin
  • shellinabox
  • nginx
  • zabbix
  • ettercap
  • apcupsd

Installing phpMyAdmin

Install the package

yum -y phpMyAdmin

Edit the phpMyAdmin configuration file to allow access to the interface.

vi /etc/httpd/conf.d/phpMyAdmin.conf

Find the existing Require and Allow criteria and substitute your own management IP Address. Conversely if you want to allow access from anywhere (probably not a good idea, but hey – it’s your server) you can substitute these rules instead.

Require all granted
Allow from all

..finally don’t forget to restart the webserver.

service httpd restart

 

With malware systems scanning for server vulnerabilities all the time (like Windigo), it’s important to secure your server wherever possible. Especially at the shell level and double if you have SSH facing the internet.

Check the security guide at CentOS’s website…

http://wiki.centos.org/HowTos/Network/SecuringSSH

More How-To’s can be found here…

http://wiki.centos.org/HowTos

Following up on my CentOS 6.5 WebServer tutorial, here’s how you can get a Multisite WordPress installation up and running muay pronto!

Read the rest of this entry »

Here’s a brief (?) rundown for setting up a CentOS 6.5 web server from scratch, using Linux Apache, MySQL and PHP (a.k.a LAMP).

Firstly, fetch the latest CentOS-6.5-x86_64-bin-DVD1.iso from one of their mirrors.
http://isoredirect.centos.org/centos/6/isos/x86_64/

Boot the ISO and follow the prompts to install CentOS. Most defaults should get you going. You can configure the network settings and operating system features (packages) from within the installer, but for the most part the general defaults should get you to where you need to be. This tutorial will cover off everything you need, even for a “Basic Server” install.

Read the rest of this entry »

Follow

Get every new post delivered to your Inbox.