<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Small business made easy &#187; security</title>
	<atom:link href="http://www.imel.co.za/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.imel.co.za</link>
	<description>A practicle approach</description>
	<lastBuildDate>Sun, 22 Apr 2012 18:15:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Keeping tabs on your bandwidth usage</title>
		<link>http://www.imel.co.za/bandwidth</link>
		<comments>http://www.imel.co.za/bandwidth#comments</comments>
		<pubDate>Fri, 22 Jan 2010 21:01:27 +0000</pubDate>
		<dc:creator>imel</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://imel.co.za/?p=5976</guid>
		<description><![CDATA[I run a business which rents out fully serviced office space on a short and long term basis.  One of the services I offer my customers is internet access. During the last few months the average ADSL bandwidth usage has grown to over 50 GB per month.  As bandwidth is still relatively expensive in SA (I use Afrihost&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://oss.oetiker.ch/rrdtool"><img class="size-full wp-image-5979 alignright" style="margin-left: 5px; margin-right: 5px;" title="rrd" src="http://imel.co.za/wp-content/uploads/2010/01/rrd.jpg" alt="" width="136" height="102" /></a>I run a business which rents out fully serviced office space on a short and long term basis.  One of the services I offer my customers is internet access.</p>
<p>During the last few months the average ADSL bandwidth usage has grown to over 50 GB per month.  As bandwidth is still relatively expensive in SA (I use <a href="http://www.afrihost.com/" target="_blank">Afrihost&#8217;s </a>excellent value for money ADSL at R29/GB) I needed to see where this actually goes.<span id="more-5976"></span></p>
<p><img class="alignleft size-full wp-image-5984" title="bridge" src="http://imel.co.za/wp-content/uploads/2010/01/bridge.png" alt="" width="208" height="399" /><a href="http://www.ubuntu.com/"><img class="size-full wp-image-5983 alignright" title="ubuntu" src="http://imel.co.za/wp-content/uploads/2010/01/ubuntu.jpg" alt="" width="79" height="72" /></a>The solution is a ubuntu based linux server with a collection of different open source products installed, plugged into the network just before the traffic enters the internet.</p>
<p>The ideal place for this server is between the network switch and the default gateway.  All traffic from devices on the inside of the bridge will now have to pass through the bridge server before entering the internet.</p>
<p>The server contains two network interfaces and is configured in bridge mode, allowing network traffic to pass through the server transparently, without even being aware of being scanned.</p>
<p>The key to this working is by bridging both ethernet interfaces together, using the ubuntu <em> bridge</em>-utils package and brctl command. Also make sure that http traffic  destined for the web gets redirected to dansguardian for filtering before leaving the network.</p>
<p>Using bridge mode has the added advantagew that it is not only completely invisible, it also require no changes on the existing netork pc&#8217;s. As long as it is placed just before the external gateway / firewall then all traffic will pass through it, including hardware devices like wifi routers, etc.</p>
<p>Once the server is installed, configured and switched into bridge mode the necessary monitoring software is installed. I use <a href="http://www.squid-cache.org" target="_blank">squid</a> as a proxy server, <a href="http://dansguardian.org/" target="_blank">dansguardian</a> for traffic filtering and <a href="http://www.ntop.org/" target="_blank">ntop</a> for bandwith monitoring.</p>
<p><a href="http://dansguardian.org/" target="_blank"><img class="alignright size-full wp-image-5982" title="dansguardian" src="http://imel.co.za/wp-content/uploads/2010/01/dansguardian.jpg" alt="" width="96" height="96" /></a><a href="http://dansguardian.org/" target="_blank">Dansguardian</a> is great for rule based filtering, but comes with a static set of rules. I expanded my configuration by adding blacklists from <a href="http://www.shallalist.de/" target="_blank">shalla</a>. The shalla lists are broken down by category and contains over 1.3 million entries.  As the lists are updated frequently I configured a cron job to download the lists nightly and copy it to the appropriate folders.</p>
<p>In dansguardian I then enable the specific categories that needs to be blocked, like porn, gambling, etc. Dansguard also contains exception lists for blocking or unblocking specific sites, keywords or ip addresses.</p>
<p>Another handy feature of dansguardian is that is uses clamav to automatically scan all downloaded files for virusses before letting it through.</p>
<p><a href="http://www.squid-cache.org/" target="_blank"><img class="size-full wp-image-5981 alignleft" title="squid" src="http://imel.co.za/wp-content/uploads/2010/01/squid.jpg" alt="" width="121" height="62" /></a><a href="http://www.squid-cache.org/" target="_blank">Squid</a> is configured as a transparent proxy server, allowing traffic caching and reporting. Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more.   It reduces bandwidth and improves response times by caching and   reusing frequently-requested web pages.</p>
<p><a href="http://www.ntop.org/" target="_blank"><img class="alignright size-full wp-image-5980" title="ntop" src="http://imel.co.za/wp-content/uploads/2010/01/ntop.jpg" alt="" width="83" height="40" /></a><a href="http://www.ntop.org/" target="_blank">Ntop</a> is used to monitor and report on all network traffic passing through the server. When configuring ntop make sure to set it to watch the external interface only, so you do not pick up traffic not destined for the internet.</p>
<p>Iptables is used as a firewall for blocking specific protocols or destinations, and also for forwarding all HTTP traffic destined for the internet to dansguardian, which applies its rule based filters and then pass the traffic on to squid, which in turn passes it on to the internet if not served from the local cache.</p>
<p>Some outstanding issues is dealing effectively with bittorrent and peer to peer traffic, without having to create countless manual rules. For now the ntop reports give clear usage by source, target, protocol, etc. It is relatively easy to identify bandwith hogs and deal with them, but it takes time and is a re-active process rather than being pro-active.</p>
<p>Next step is to automate the creation of iptable firewall rules on the fly to filter traffic as it is identified as inappropriate. Another todo is to add is to scan mail for spam and virusses.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.imel.co.za/bandwidth/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

