<?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>xxxl.co.za</title>
	<atom:link href="http://xxxl.co.za/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://xxxl.co.za</link>
	<description>Random stuff</description>
	<lastBuildDate>Fri, 26 Apr 2013 18:46:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Freeradius 6 on Centos</title>
		<link>http://xxxl.co.za/?p=190</link>
		<comments>http://xxxl.co.za/?p=190#comments</comments>
		<pubDate>Fri, 26 Apr 2013 18:46:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=190</guid>
		<description><![CDATA[I found this howto very usefull: http://littlehi.com/install-freeradius-on-centos-6/]]></description>
				<content:encoded><![CDATA[<p>I found this howto very usefull:</p>
<p><a href="http://littlehi.com/install-freeradius-on-centos-6/">http://littlehi.com/install-freeradius-on-centos-6/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=190</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk stuff i use from time to time for troubleshooting.</title>
		<link>http://xxxl.co.za/?p=182</link>
		<comments>http://xxxl.co.za/?p=182#comments</comments>
		<pubDate>Mon, 11 Mar 2013 08:02:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=182</guid>
		<description><![CDATA[Ok, so from time to time you need to get some stuff out of asterisk. Here is one to show useragents of registered phones: for a in `asterisk -rx &#34;sip show peers&#34;&#124;cut -f1 -d/` ;do asterisk -rx &#34;sip show peer $a&#34;;done&#124;grep Useragent Will provide IP address and peers as well: for a in `asterisk -rx<p><a class="more-link" href="http://xxxl.co.za/?p=182">Read more <span class="more-sep">[+]</span></a></p>]]></description>
				<content:encoded><![CDATA[<p>Ok, so from time to time you need to get some stuff out of asterisk.</p>
<p>Here is one to show useragents of registered phones:</p>
<pre class="wp-code-highlight prettyprint">for a in `asterisk -rx &quot;sip show peers&quot;|cut -f1 -d/` ;do asterisk -rx &quot;sip show peer $a&quot;;done|grep Useragent</pre>
<p>Will provide IP address and peers as well:</p>
<pre class="wp-code-highlight prettyprint">for a in `asterisk -rx &quot;sip show peers&quot; | grep -v &#039;Monitored\|Name\|Unspecified&#039; | cut -d &#039;/&#039; -f1` ;do echo $a; asterisk -rx &quot;sip show peer $a&quot; | grep &#039;Useragent\|Addr-&gt;IP&#039;;done</pre>
<p>This one will show registered ip&#8217;s and contact</p>
<pre class="wp-code-highlight prettyprint">for a in `asterisk -rx &quot;sip show peers&quot;|cut -f1 -d/` ;do asterisk -rx &quot;sip show peer $a&quot;;done|grep Contact</pre>
<p>This one will show phones that have become lagged:</p>
<pre class="wp-code-highlight prettyprint">cat /var/log/asterisk/full |grep NOTICE |grep Lagged | awk &#039;{print $6}&#039; | sort -n | uniq</pre>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=182</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing my freeradius db from vanilla to cluster.</title>
		<link>http://xxxl.co.za/?p=178</link>
		<comments>http://xxxl.co.za/?p=178#comments</comments>
		<pubDate>Mon, 12 Nov 2012 13:29:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=178</guid>
		<description><![CDATA[Seems like we first have to modify dump file and alter tables before importing. Otherwise we get this nice: ERROR 1297 (HY000): Got temporary error 218 &#039;Out of LongMessageBuffer&#039; from NDBCLUSTER sed -i &#039;s/ENGINE=MyISAM/ENGINE=NDBCLUSTER/&#039; tbl_name.sql]]></description>
				<content:encoded><![CDATA[<p>Seems like we first have to modify dump file and alter tables before importing.<br />
Otherwise we get this nice:</p>
<pre class="wp-code-highlight prettyprint">ERROR 1297 (HY000): Got temporary error 218 &#039;Out of LongMessageBuffer&#039; from NDBCLUSTER</pre>
<pre class="wp-code-highlight prettyprint">sed -i &#039;s/ENGINE=MyISAM/ENGINE=NDBCLUSTER/&#039; tbl_name.sql</pre>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=178</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encoding with ffmpeg to PS3</title>
		<link>http://xxxl.co.za/?p=172</link>
		<comments>http://xxxl.co.za/?p=172#comments</comments>
		<pubDate>Sat, 10 Nov 2012 14:13:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=172</guid>
		<description><![CDATA[Struggled with something that is supposed to be easy.. Ubuntu 12.10 x86_64 &#160; ffmpeg -y -i rawmovie.mpg -vcodec libx264 -level 41 -tune film -crf 24 -threads 0 -acodec libmp3lame -ab 128k -ac 2 -ar 48000 output.mp4 &#160;]]></description>
				<content:encoded><![CDATA[<p>Struggled with something that is supposed to be easy..<br />
Ubuntu 12.10 x86_64</p>
<p>&nbsp;</p>
<pre class="wp-code-highlight prettyprint">
ffmpeg -y -i rawmovie.mpg -vcodec libx264 -level 41 -tune film -crf 24 -threads 0 -acodec libmp3lame -ab 128k -ac 2 -ar 48000 output.mp4
</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=172</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>L2TP client on Centos</title>
		<link>http://xxxl.co.za/?p=167</link>
		<comments>http://xxxl.co.za/?p=167#comments</comments>
		<pubDate>Mon, 27 Aug 2012 15:45:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=167</guid>
		<description><![CDATA[The mission: So the object here was to make Centos servers connect via L2TP to a Mikrotik LAC in order to provide connectivity with private ip’s. This example will build a persistent L2TP tunnel which will auto reconnect and try to remain persistent. Read here&#8230;]]></description>
				<content:encoded><![CDATA[<h5><a href="http://xxxl.co.za/wp-content/uploads/2012/08/centos.png"><img class="alignnone  wp-image-105" title="centos" src="http://xxxl.co.za/wp-content/uploads/2012/08/centos-150x150.png" alt="" width="108" height="108" /></a></h5>
<h5>The mission:</h5>
<p>So the object here was to make Centos servers connect via L2TP to a Mikrotik LAC in order to provide connectivity with private ip’s.</p>
<p>This example will build a persistent L2TP tunnel which will auto reconnect and try to remain persistent.</p>
<p><a title="Centos L2TP Client to Mikrotik L2TP-Server" href="http://xxxl.co.za/?page_id=142">Read here&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=167</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Safe SSH tunnel based Mysql updates (Well i think?)</title>
		<link>http://xxxl.co.za/?p=66</link>
		<comments>http://xxxl.co.za/?p=66#comments</comments>
		<pubDate>Fri, 10 Aug 2012 10:34:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=66</guid>
		<description><![CDATA[Server: Setup user with key based authentication: useradd -s /bin/false myuser mkdir /home/myuser/.ssh touch /home/myuser/.ssh/authorized_keys chown -R myuser:myuser /home/myuser/.ssh chmod 755 /home/myuser/.ssh chmod 600 /home/myuser/.ssh/authorized_keys Client side: Install rpmforge repo and autossh. rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm or wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm sed -i &#34;s/enabled = 1/enabled = 0/&#34; /etc/yum.repos.d/rpmforge.repo yum<p><a class="more-link" href="http://xxxl.co.za/?p=66">Read more <span class="more-sep">[+]</span></a></p>]]></description>
				<content:encoded><![CDATA[<p>Server:<br />
Setup user with key based authentication:</p>
<pre class="wp-code-highlight prettyprint">useradd -s /bin/false myuser
mkdir /home/myuser/.ssh
touch /home/myuser/.ssh/authorized_keys
chown -R myuser:myuser /home/myuser/.ssh
chmod 755 /home/myuser/.ssh
chmod 600 /home/myuser/.ssh/authorized_keys</pre>
<p>Client side:<br />
Install rpmforge repo and autossh.</p>
<pre class="wp-code-highlight prettyprint">rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
or
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm

rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
sed -i &quot;s/enabled = 1/enabled = 0/&quot; /etc/yum.repos.d/rpmforge.repo
yum -y install --enablerepo=rpmforge autossh
ssh-keygen -t rsa</pre>
<p>Set up an RSA key pair as root on each client, leaving all questions blank:</p>
<pre class="wp-code-highlight prettyprint">ssh-keygen -t rsa
root@local# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/var/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /var/root/.ssh/id_rsa.
Your public key has been saved in /var/root/.ssh/id_rsa.pub.
The key fingerprint is:
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX root@myhost.local</pre>
<p>Now scp this to your server:</p>
<pre class="wp-code-highlight prettyprint">scp -P 22 /root/.ssh/id_rsa.pub root@myserver.com:/tmp/myuser.local_rsa.pub</pre>
<p>On Server: Add to your authorized_keys.</p>
<pre class="wp-code-highlight prettyprint">cat /tmp/myuser.local_rsa.pub &amp;gt;&amp;gt; /home/myuser/.ssh/authorized_keys</pre>
<p>Client side:<br />
create /etc/init.d/startautossh on client with contents below. //This example nables connection to server MySQL port 3306 on localhost port 3307.</p>
<pre class="wp-code-highlight prettyprint"># pidfile: /var/run/autossh.pid
# @since 2012-02-22 15:31:47
# @author Roderick Derks
# Source function library
. /etc/init.d/functions

prog=&quot;autossh&quot;
autossh=&quot;/usr/bin/autossh&quot;
RETVAL=0
AUTOSSH_PIDFILE=/var/run/autossh.pid

# Tunnel configuration
LOCAL_PORT_LISTEN=3307
REMOTE_DESTINATION_PORT=3306
USER=myuser
REMOTE_DESTINATION_IP=yourserver.com
REMOTE_SSH_SERVER_PORT=22

start() {
echo -n $&quot;Starting $prog: &quot;
if [ ! -e $AUTOSSH_PIDFILE ]; then
AUTOSSH_PIDFILE=$AUTOSSH_PIDFILE;export AUTOSSH_PIDFILE
autossh -M 0 -q -f -N -o &quot;ServerAliveInterval 60&quot; -o &quot;ServerAliveCountMax 3&quot; -L $LOCAL_PORT_LISTEN:localhost:$REMOTE_DESTINATION_PORT -p $REMOTE_SSH_SERVER_PORT  $USER@$REMOTE_DESTINATION_IP

RETVAL=$?
else
RETVAL=1
echo_failure
echo pid file still exists $AUTOSSH_PIDFILE
fi
echo
[ $RETVAL -eq 0 ] touch /var/lock/subsys/$prog
return $RETVAL
}

stop() {
echo -n $&quot;Stopping $prog: &quot;
killproc $autossh
RETVAL=$?
echo
[ $RETVAL -eq 0 ] rm -f /var/lock/subsys/$prog rm -f $AUTOSSH_PIDFILE
return $RETVAL
}

case &quot;$1&quot; in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status $autossh
RETVAL=$?
;;
*)

echo $&quot;Usage: $0 {start|stop|restart|status}&quot;
esac
RETVAL=1</pre>
<p>Client side: (make script executeable):</p>
<pre class="wp-code-highlight prettyprint">chmod +x /etc/init.d/startautossh</pre>
<p>References:</p>
<p>http://www.r71.nl/kb/technical/348-autossh-init-script</p>
<p>http://tychoish.com/rhizome/persistent-ssh-tunels-with-autossh/</p>
<p>http://www.jbmurphy.com/2011/04/29/autossh-on-centos/</p>
<p>http://chxo.com/be2/20040511_5667.html</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=66</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk integration with Huawei Soft-Switch</title>
		<link>http://xxxl.co.za/?p=52</link>
		<comments>http://xxxl.co.za/?p=52#comments</comments>
		<pubDate>Tue, 13 Mar 2012 14:45:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Howto's]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=52</guid>
		<description><![CDATA[     I needed to configure a SIP trunk with Asterisk to a provider using a Huawei soft switch. It was not painless&#8230;. Firstly there was a well known error regarding silence suppression: In the SIP INVITE asterisk sends: &#8220;a=silenceSupp:off &#8211; - &#8211; - -&#8221; It is too difficult for Huawei&#8217;s coders to accomodate this,<p><a class="more-link" href="http://xxxl.co.za/?p=52">Read more <span class="more-sep">[+]</span></a></p>]]></description>
				<content:encoded><![CDATA[<p><img class="alignnone" title="Centos" src="http://1.bp.blogspot.com/_atSBo-i93uk/TRIj94G9HtI/AAAAAAAAACU/MLy7o9fJFsg/s200/centos.png" alt="" width="82" height="82" />   <img class="alignnone" title="Digium" src="http://www.digium.com/images/graphics/asterisk-orange-transparent.png" alt="" width="92" height="81" />  <img class="alignnone" title="Huawei" src="http://www.kestrel-is.gr/photos/huawei_logo_small.gif" alt="" width="102" height="81" /></p>
<p>I needed to configure a SIP trunk with Asterisk to a provider using a Huawei soft switch.</p>
<p>It was not painless&#8230;.</p>
<p>Firstly there was a well known error regarding silence suppression:</p>
<p>In the SIP INVITE asterisk sends: &#8220;<span style="color: #0000ff;">a=silenceSupp:off &#8211; - &#8211; - -</span>&#8221;</p>
<p>It is too difficult for Huawei&#8217;s coders to accomodate this, so it sends back:</p>
<p>&#8220;<span style="color: #0000ff;">Got SIP response 500 &#8220;Server Internal Error&#8221; back from XXX.XXX.XXX.XXX</span>&#8221;</p>
<p>So the way this can be circumvented is by doing this:</p>
<ul>
<li><a title="http://lists.digium.com/pipermail/asterisk-dev/2006-March/019067.html" href="http://lists.digium.com/pipermail/asterisk-dev/2006-March/019067.html" rel="nofollow">http://lists.digium.com/pipermail/asterisk-dev/2006-March/019067.html</a></li>
<li><a title="http://lists.digium.com/pipermail/asterisk-dev/2006-March/019156.html" href="http://lists.digium.com/pipermail/asterisk-dev/2006-March/019156.html" rel="nofollow">http://lists.digium.com/pipermail/asterisk-dev/2006-March/019156.html</a></li>
<li><a title="http://bugs.digium.com/view.php?id=6669" href="http://bugs.digium.com/view.php?id=6669" rel="nofollow">http://bugs.digium.com/view.php?id=6669</a></li>
</ul>
<p>So my example use asterisk 10.2.0</p>
<p>Go look at your asterisk source file in chan_sip.c around line 11814</p>
<p>&nbsp;</p>
<p>Comment out this section:</p>
<pre class="wp-code-highlight prettyprint">/* ast_build_string(&amp;amp;a_audio_next, &amp;amp;a_audio_left, &quot;a=silenceSupp:off - - - - -\r\n&quot;); */</pre>
<p>Recompile and install.<br />
Now that has fixed the problem with the silence suppression.</p>
<p><strong>Another error appeared</strong> that the Huawei soft switch is quite pedantic with session expiry.</p>
<p>Outgoing calls from asterisk to Huawei will work, but incoming calls will be dropped when answered.<br />
this is due to this sip communication:</p>
<p><span style="color: #000000;">This is fixed by adding : </span>&#8220;<span style="color: #0000ff;">session-timers=refuse</span>&#8221; in my sip.conf</p>
<p>sip.conf file that works for me:</p>
<p><span style="color: #0000ff;">[myprovider]</span><br />
<span style="color: #0000ff;"> type=peer</span><br />
<span style="color: #0000ff;"> host=XX.XX.6.5</span><br />
<span style="color: #0000ff;"> disallow=all</span><br />
<span style="color: #0000ff;"> allow=g729</span><br />
<span style="color: #0000ff;"> allow=alaw</span><br />
<span style="color: #0000ff;"> insecure=port,invite</span><br />
<span style="color: #0000ff;"> qualify=yes</span><br />
<span style="color: #0000ff;"> nat=no</span><br />
<span style="color: #0000ff;"> context=from-myprovider</span><br />
<span style="color: #0000ff;"> canreinvite=no</span><br />
<span style="color: #0000ff;"> t38pt_udptl = yes</span><br />
<span style="color: #0000ff;"> session-timers=refuse</span></p>
<p>Time will tel how stable this config is, but it looks promising.<br />
Hope this helps somebody out there.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=52</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating Ruby in Centos 5.X</title>
		<link>http://xxxl.co.za/?p=44</link>
		<comments>http://xxxl.co.za/?p=44#comments</comments>
		<pubDate>Tue, 27 Dec 2011 07:41:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=44</guid>
		<description><![CDATA[Many thanx to John Alberts whom created this script. I found this invaluable while working with Metasploit. Originally from: https://raw.github.com/albertsj1/Misc-Scripts/master/install_gems.sh &#160; #!/bin/sh ######################################## # Created by John Alberts # Last modified: 04/21/2011 # # Error Codes: # 1 - Not running as root # 2 - Invalid hostname # 3 - Failed to get remove<p><a class="more-link" href="http://xxxl.co.za/?p=44">Read more <span class="more-sep">[+]</span></a></p>]]></description>
				<content:encoded><![CDATA[<p>Many thanx to John Alberts whom created this script.</p>
<p>I found this invaluable while working with Metasploit.</p>
<p>Originally from: <a href="https://raw.github.com/albertsj1/Misc-Scripts/master/install_gems.sh" target="_blank">https://raw.github.com/albertsj1/Misc-Scripts/master/install_gems.sh</a></p>
<p>&nbsp;</p>
<pre class="wp-code-highlight prettyprint">
#!/bin/sh

########################################
# Created by John Alberts
# Last modified: 04/21/2011
#
# Error Codes:
#  1 - Not running as root
#  2 - Invalid hostname
#  3 - Failed to get remove Ruby OS packages
#  4 - Failed to compile and install Ruby
#
# NOTES:
#  This only works on CentOS 5.  Only tested on x86_64
#
#########################################

#RUBY_SOURCE_URL=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p136.tar.gz&quot;
RUBY_SOURCE_URL=&quot;http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz&quot;
# The below URL only works from within the exlibrisgroup network.  Anyone else should use the URL above.
# RUBY_SOURCE_URL=&quot;https://helpdesk.hosted.exlibrisgroup.com/downloads/ruby-1.9.2-p180.tar.gz&quot;

if ! ( whoami | grep root &gt; /dev/null 2&gt;&amp;1); then
  echo &quot;YOU MUST BE ROOT TO RUN THIS SCRIPT&quot;&#039;!&#039;
  exit 1
fi

if ! ( ping -c1 -q `hostname -f` &gt; /dev/null 2&gt;&amp;1 ); then
  echo &quot;hostname -f must be a valid fqdn for Chef to work properly&quot;&#039;!&#039;
  exit 2
fi

echo &quot;Removing already installed Ruby OS packages...&quot;
PKGLIST=&quot;$(yum list | grep installed | grep ruby | sed -n &#039;s/\([^.]*\)\.\(x86_64\|i386\).*$/\1/p&#039; | tr &#039;\n&#039; &#039; &#039;)&quot;
if [[ $PKGLIST != &quot;&quot; ]]; then
  yum -y erase $PKGLIST
  RETVAL=$?
else
  RETVAL=0
fi

echo;echo
if [[ ${RETVAL} -ne 0 ]]; then
  echo &quot;Failed to remove Ruby OS packages&quot;&#039;!&#039;
  exit 3
fi

echo &quot;Installing Ruby and dependencies...&quot;
yum -y install gcc gcc-c++ zlib-devel openssl-devel readline-devel make

mkdir /tmp/sources
cd /tmp/sources

# Get # cpu&#039;s to make this faster
if [[ ! $CPUS ]]; then
  CPUS=&quot;$(grep processor /proc/cpuinfo | wc -l)&quot;
fi

wget &quot;${RUBY_SOURCE_URL}&quot;
tar -xvzf $(basename ${RUBY_SOURCE_URL})
cd $(basename ${RUBY_SOURCE_URL/.tar.gz})
./configure
make -j $CPUS
make -j $CPUS install
RETVAL=$?

echo;echo

if [[ ${RETVAL} -ne 0 ]]; then
  echo &quot;RUBY INSTALLATION FAILED&quot;&#039;!&#039;
  exit 4
fi

echo &#039;gem: --no-ri --no-rdoc&#039; &gt; /root/.gemrc

echo &quot;Installation completed.&quot;
</pre>
<p>Many thanx to John!</p>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=44</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dealing with outgoing smtp problems</title>
		<link>http://xxxl.co.za/?p=33</link>
		<comments>http://xxxl.co.za/?p=33#comments</comments>
		<pubDate>Thu, 21 Jul 2011 11:15:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=33</guid>
		<description><![CDATA[In some of my networks there are a huge number users connected through a  internet connection with NAT. Users do pick up virus&#8217;s and bots from time to time. The result is lots of port 25 smtp traffic streaming out the network and the gateway ip obviously gets blacklisted soon. Seems like SMTP-Gated offers some<p><a class="more-link" href="http://xxxl.co.za/?p=33">Read more <span class="more-sep">[+]</span></a></p>]]></description>
				<content:encoded><![CDATA[<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAIAAAABc2X6AAAgAElEQVR4nLW8Z5RU1bouzBjfj/vds+85556zjQgiEkRQBARFBd1m3dvMVrdgRkWQKBlEBAElSe6mI3TOOQc659x0jtVd1aG6unKtWmmG5/5Y1QGRfY9nXGvMsWxX02vNZ77zTc/7zpqC3/OhgAxIgAwQDsoACjBtMHAVkAEVHODgHGDgBGAAGIVMIMsQ3ZCdcDvgdsIhwirDTGCms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h7HDTlAlLrlVz3M4OGVEoZ7nM04UOh7Qi4JEFBUcqqrKsqyl2ZxOKtkyyC5p/G/dLkFV5XH2gUpk8gx/laJq/3UJsqwwrlUeNBIPYJIkSZIbgCzLgiCoqgrGGaFUJYxQRqg2Y0rgdIhOh6jIY2AYZIkSdeI1qsJliVICANrkBMEpCALAtGZmxhghnvcyxmRZ1H52S4JGekqSmzEyjlxyi5wyRqgkuSnVCHDmdruYogpWp8bkEYXKojLOySgqFSVFYVxh3CXJgqoSYAoHGydiZVlkjABM49BUVXU5nNr7OGWaEG4+0EkJZImCQ5GZ0+ERGhn/qhlAEJyAxq0ygLndLoCJoqfdSFEkgDFGFEXiYKLs0s4gSMrYP5BkWZS0OWgP4SCUKyJxc3hO3Gji5RREodpLCeWUgYCPZz4KIIP/H1QDSEnw2FJsAAAAAElFTkSuQmCC" alt="" /></p>
<p>In some of my networks there are a huge number users connected through a  internet connection with NAT.<br />
Users do pick up virus&#8217;s and bots from time to time. The result is lots of port 25 smtp traffic streaming out the network and the gateway ip obviously gets blacklisted soon.</p>
<p>Seems like <a href="http://software.klolik.org/smtp-gated/">SMTP-Gated</a> offers some help with this.</p>
<p>I start of with building a rpm of smtp-gated.<br />
Getting a rpm building environment is easy:</p>
<p>yum install rpm-build redhat-rpm-config gcc openssl openssl-devel</p>
<p>Add a user. It is essential that you NEVER build rpm&#8217;s as root.<br />
[devel@hostname ~]$ useradd devel<br />
[devel@hostname ~]$ password devel</p>
<p>Login as newly created devel user.</p>
<p>Add these to make build directory structure:<br />
[devel@hostname ~]$ mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}<br />
[devel@hostname ~]$ echo &#8216;%_topdir %(echo $HOME)/rpmbuild&#8217; &gt; ~/.rpmmacros</p>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=33</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Attempted LUSCA Caching Server</title>
		<link>http://xxxl.co.za/?p=20</link>
		<comments>http://xxxl.co.za/?p=20#comments</comments>
		<pubDate>Sun, 05 Jun 2011 09:34:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xxxl.co.za/?p=20</guid>
		<description><![CDATA[Attempt at LUSCA  High performance caching server with tproxy and store rewrite. Most of this stuff has been taken from forums, google etc&#8230; 1. Install Ubuntu server 10.04.2 64 bit 2. Install dependencies apt-get install gcc make automake sharutils linux-headers-`uname -r` libcap libcap-dev Check if correct kernel modules gets loaded: cat /boot/config-`uname -r` &#124; grep<p><a class="more-link" href="http://xxxl.co.za/?p=20">Read more <span class="more-sep">[+]</span></a></p>]]></description>
				<content:encoded><![CDATA[<p>Attempt at LUSCA  High performance caching server with tproxy and store rewrite.<br />
Most of this stuff has been taken from forums, google etc&#8230;</p>
<p>1. Install Ubuntu server 10.04.2 64 bit<br />
2. Install dependencies<br />
apt-get install gcc make automake sharutils linux-headers-`uname -r` libcap libcap-dev</p>
<p>Check if correct kernel modules gets loaded:<br />
cat /boot/config-`uname -r` | grep -E &#8216;(NF_CONNTRACK=|TPROXY|XT_MATCH_SOCKET|XT_TARGET_TPROXY)&#8217;<br />
This is a good result:<br />
CONFIG_NF_CONNTRACK=m<br />
CONFIG_NETFILTER_TPROXY=m<br />
CONFIG_NETFILTER_XT_TARGET_TPROXY=m<br />
CONFIG_NETFILTER_XT_MATCH_SOCKET=m</p>
<p>3. Obtain Lusca Head branch of Squid</p>
<pre class="wp-code-highlight prettyprint">
cd /usr/src/
wget http://lusca-cache.googlecode.com/files/LUSCA_HEAD-r14809.tar.gz
tar -xvf LUSCA_HEAD-r14809.tar.gz
cd LUSCA_HEAD-r14809
</pre>
<p>4. Build Lusca<br />
# Start configuring and compiling</p>
<pre class="wp-code-highlight prettyprint">
./bootstrap.sh
make distclean</pre>
<p>Configure Options Debian:</p>
<pre class="wp-code-highlight prettyprint">
./configure &#039;--prefix=/usr/local/lusca/&#039; &#039;--enable-async-io&#039; &#039;--with-pthreads&#039; &#039;--enable-storeio=aufs,coss,null&#039; &#039;--enable-linux-netfilter&#039; &#039;--enable-arp-acl&#039; &#039;--enable-epoll&#039; &#039;--enable-removal-policies=lru,heap&#039; &#039;--enable-snmp&#039; &#039;--enable-delay-pools&#039; &#039;--enable-htcp&#039; &#039;--enable-cache-digests&#039; &#039;--enable-referer-log&#039; &#039;--enable-useragent-log&#039; &#039;--enable-follow-x-forwarded-for&#039; &#039;--with-large-files&#039; &#039;--with-maxfd=65536&#039; &#039;amd64-debian-linux&#039; &#039;--enable-linux-tproxy4&#039; &#039;build_alias=amd64-debian-linux&#039; &#039;host_alias=amd64-debian-linux&#039; &#039;target_alias=amd64-debian-linux&#039; &#039;CFLAGS=-Wall -g -O2&#039; &#039;LDFLAGS=-Wl,-Bsymbolic-functions&#039; &#039;CPPFLAGS=&#039;
</pre>
<p>Configure RH Options</p>
<pre class="wp-code-highlight prettyprint">
./configure &#039;--build=x86_64-redhat-linux-gnu&#039; &#039;--host=x86_64-redhat-linux-gnu&#039; &#039;--target=x86_64-redhat-linux-gnu&#039;  &#039;--program-prefix=&#039; &#039;--prefix=/usr&#039; &#039;--exec-prefix=/usr&#039; &#039;--bindir=/usr/bin&#039;  &#039;--sbindir=/usr/sbin&#039; &#039;--sysconfdir=/etc&#039; &#039;--includedir=/usr/include&#039;  &#039;--libdir=/usr/lib64&#039; &#039;--libexecdir=/usr/libexec&#039; &#039;--sharedstatedir=/var/lib&#039; &#039;--mandir=/usr/share/man&#039; &#039;--infodir=/usr/share/info&#039; &#039;--exec_prefix=/usr&#039; &#039;--bindir=/usr/sbin&#039; &#039;--libexecdir=/usr/lib64/squid&#039; &#039;--localstatedir=/var&#039; &#039;--datadir=/usr/share&#039; &#039;--sysconfdir=/etc/squid&#039; &#039;--disable-dependency-tracking&#039; &#039;--disable-arp-acl&#039; &#039;--disable-cache-digests&#039; &#039;--enable-cachemgr-hostname=localhost&#039; &#039;--disable-delay-pools&#039; &#039;--enable-epoll&#039;  &#039;--enable-external-acl-helpers=ip_user,unix_group&#039; &#039;--enable-icap-client&#039;  &#039;--disable-ident-lookups&#039; &#039;--enable-referer-log&#039;  &#039;--enable-removal-policies=heap,lru&#039; &#039;--disable-snmp&#039; &#039;--enable-ssl&#039; &#039;--enable-storeio=aufs,coss&#039; &#039;--disable-useragent-log&#039; &#039;--disable-wccpv2&#039; &#039;--with-aio&#039; &#039;--with-default-user=squid&#039; &#039;--with-dl&#039; &#039;--with-pthreads&#039; &#039;build_alias=x86_64-redhat-linux-gnu&#039; &#039;host_alias=x86_64-redhat-linux-gnu&#039;  &#039;target_alias=x86_64-redhat-linux-gnu&#039; &#039;CFLAGS=-fPIE -Os -g -pipe  -fsigned-char -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic&#039;  &#039;LDFLAGS=-pie&#039; &#039;CXXFLAGS=-fPIE -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2  -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64  -mtune=generic&#039; &#039;FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -I/usr/lib64/gfortran/modules&#039; &#039;--with-large-files&#039; &#039;--enable-linux-netfilter&#039; &#039;--with-maxfd=32000&#039; &#039;--disable-follow-x-forwarded-for&#039; &#039;--enable-truncate&#039; &#039;--disable-unlinkd&#039;  &#039;--disable-htcp&#039; &#039;--enable-kill-parent-hack&#039;

make all
make install
</pre>
<p>5. Post install<br />
# Link install location to general file system locations</p>
<pre class="wp-code-highlight prettyprint">
ln -s /usr/local/lusca/etc /etc/lusca
ln -s /usr/local/lusca/var/logs /var/log/lusca
mkdir /usr/local/lusca/var/cache
</pre>
<p># Prepare cache and log dir with correct permissions</p>
<pre class="wp-code-highlight prettyprint">
chown nobody /usr/local/lusca/var/cache /usr/local/lusca/var/logs
ln -s /usr/local/lusca/sbin/squid /usr/sbin/squid
ln -s /usr/local/lusca/bin/squidclient /usr/bin/squidclient
</pre>
<p># Setup Cron<br />
4 * * * * /usr/sbin/squid -k rotate</p>
<p># Copy rc startup script</p>
<pre class="wp-code-highlight prettyprint">
cp /usr/src/LUSCA_HEAD-r14809/contrib/lusca.rc /etc/init.d/lusca
# make executeable
chmod +x /etc/init.d/lusca
</pre>
<p>6. Configure Lusca:</p>
<p>&nbsp;</p>
<p>My squid.conf</p>
<pre class="wp-code-highlight prettyprint">
#######################################################
## Lusca High Performance Configuration
## ====================================================
## By. teukuri...@yahoo.com.sg
## Updated:    April 24,2011
#######################################################
##start of config
#http_port 3128 tproxy transparent
http_port 3128 transparent
#http_port 3128 transparent
#server_http11 on
#icp_port 0
# cache_peer 203.128.88.193 parent 8910 0 no-query no-netdb-exchange
no-digest

# File Squid
#pid_filename /var/run/lusca.pid
#coredump_dir /usr/local/lusca/var/cache
#error_directory /usr/share/squid/errors/English
#icon_directory /usr/share/squid/icons
#mime_table /etc/squid/mime.conf
visible_hostname pcw_cache1
cache_mgr support@example.com

# Log Squid
access_log /var/log/squid/access.log squid
#acces_log none
#cache_log none
cache_store_log none

# Beberapa log yg tidak signifikan karena opsi2-nya jarang digunakan.
log_fqdn off
log_icp_queries off
buffered_logs off
emulate_httpd_log off

#===========================================================================
# TAG: FTP section
#---------------------------------------------------------------------------
# Always use this option to reduce the traffic load. FTP passive mode
# causes the client to not relate directly to an FTP server destination
# and using squid as a relay so that the bandwidth for FTP connection
# can be controlled possibly by a combination of IP filtering (PF (BSD) / IPTABLES).
#===========================================================================
ftp_list_width 32
ftp_passive on
ftp_sanitycheck on

#===================================================================
# TAG: ACL Section
#-------------------------------------------------------------------
# Allow local network(s) on interface(s)
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#===================================================================
# acl localnet src &quot;/etc/squid/ip-privadas&quot;    # IP LOCALES
acl localnet src 192.168.0.0/16
acl localnet src 172.16.0.0/12
acl localnet src 172.101.0.0/24
acl localnet src 172.50.4.0/24
acl localnet src 10.0.0.0/8

uri_whitespace strip

#DNS NAMESERVER

dns_nameservers 172.16.1.2
dns_nameservers 8.8.8.8

cache_mem 780 MB
maximum_object_size_in_memory 16 KB
memory_replacement_policy lru
cache_replacement_policy lru

cache_dir aufs /var/spool/squid/ 51200 32 256
cache_dir aufs /cache/cache1 51200 32 256
cache_dir aufs /cache/cache2 51200 32 256
cache_dir aufs /cache/cache3 51200 32 256

minimum_object_size 0 bytes
maximum_object_size 704 MB
offline_mode off
cache_swap_low 80%
cache_swap_high 100%

# Setup some default acls
acl all src 0.0.0.0/0
acl localhost src 127.0.0.1/32
acl Safe_ports port 21 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 80 # http
acl Safe_ports port 81 #
acl Safe_ports port 210 # wais
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 443 # https
acl Safe_ports port 488 # gss-http
acl Safe_ports port 563 #
acl Safe_ports port 591 # filemaker
acl Safe_ports port 631 #
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 3128 # multiling http
acl Safe_ports port 1025-65535 # unregistered ports

acl sslports port 443 563 81
acl manager proto cache_object
acl purge method PURGE
acl connect method CONNECT
acl dynamic urlpath_regex cgi-bin \?
http_access allow manager localhost all
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !sslports
# Always allow localhost connections
http_access allow localhost

# Allow local network(s) on interface(s)
http_access allow localnet

### no cachear sitios especificos ###
#acl no_cachear dstdomain &quot;/etc/squid/sitios-excluidos.conf&quot;
#no_cache deny no_cachear
#always_direct allow no_cachear

# Default block all to be sure
via off
forwarded_for off
http_access deny all
#header_access From deny all
#header_access Server deny all
#header_access WWW-Authenticate deny all
#header_access Link deny all
#header_access Cache-Control deny all
#header_access Proxy-Connection deny all
#header_access X-Cache deny all
#header_access X-Cache-Lookup deny all
header_access Via deny all
header_access Forwarded-For deny all
header_access X-Forwarded-For deny all
#header_access Pragma deny all
#header_access Keep-Alive deny all

##follow_x_forwarded_for allow localnet
##follow_x_forwarded_for allow localhost

http_gzip on
http_gzip_types text/plain,text/html,text/xml,text/css,application/xml,application/xhtml+xml,application/rss+xml,application/javascript,application/x-javascript

#=====================================================
# TAG: ZPH
#=====================================================
tcp_outgoing_tos 0x30 localnet
zph_mode tos
zph_local 0x30
zph_parent 0
#zph_option 136

#====================================================
# TAG: STORE RULE
#====================================================
# Caching Youtube
acl store_rewrite_list urlpath_regex \/(get_video|videoplayback\?id|videoplayback.*id)
acl store_rewrite_list urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar)\?
acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
acl store_rewrite_list_domain url_regex (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
acl store_rewrite_list_path urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|avc|zip|mp3|3gp|rar|on2|mar|exe)$
acl store_rewrite_list_domain_CDN url_regex \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*) \.doubleclick\.net.*
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$ quantserve\.com
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[a-z]+[0-9]\.google\.co(m|\.id)
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(rar|zip|flv|wm(a|v)|3gp|mp(4|3)|exe|msi|avi|(mp(e?g|a|e|1|2|3|4))|cab|exe)
acl videocache_allow_url url_regex -i \.googlevideo\.com\/videoplayback \.googlevideo\.com\/videoplay \.googlevideo\.com\/get_video\?
acl videocache_allow_url url_regex -i \.google\.com\/videoplayback \.google\.com\/videoplay \.google\.com\/get_video\?
acl videocache_allow_url url_regex -i \.google\.[a-z][a-z]\/videoplayback \.google\.[a-z][a-z]\/videoplay \.google\.[a-z][a-z]\/get_video\?
acl videocache_allow_url url_regex -i proxy[a-z0-9\-][a-z0-9][a-z0-9][a-z0-9]?\.dailymotion\.com\/
acl videocache_allow_url url_regex -i vid\.akm\.dailymotion\.com\/
acl videocache_allow_url url_regex -i [a-z0-9][0-9a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?\.xtube\.com\/(.*)flv
acl videocache_allow_url url_regex -i \.vimeo\.com\/(.*)\.(flv|mp4)
acl videocache_allow_url url_regex -i va\.wrzuta\.pl\/wa[0-9][0-9][0-9][0-9]?
acl videocache_allow_url url_regex -i \.youporn\.com\/(.*)\.flv
acl videocache_allow_url url_regex -i \.msn\.com\.edgesuite\.net\/(.*)\.flv
acl videocache_allow_url url_regex -i \.tube8\.com\/(.*)\.(flv|3gp)
acl videocache_allow_url url_regex -i \.mais\.uol\.com\.br\/(.*)\.flv
acl videocache_allow_url url_regex -i \.blip\.tv\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram|m4v)
acl videocache_allow_url url_regex -i \.break\.com\/(.*)\.(flv|mp4)
acl videocache_allow_url url_regex -i redtube\.com\/(.*)\.flv
acl videocache_allow_dom dstdomain .mccont.com .metacafe.com .cdn.dailymotion.com
acl videocache_deny_dom  dstdomain .download.youporn.com .static.blip.tv
acl dontrewrite url_regex redbot\.org \.php
acl getmethod method GET

storeurl_access deny dontrewrite
storeurl_access deny !getmethod
storeurl_access allow store_rewrite_list_domain_CDN
storeurl_access allow store_rewrite_list
storeurl_access allow store_rewrite_list_domain
storeurl_access allow store_rewrite_list_path
storeurl_access deny videocache_deny_dom
storeurl_access allow videocache_allow_url
storeurl_access allow videocache_allow_dom
storeurl_access deny all

storeurl_rewrite_program /usr/sbin/storeurl.pl
storeurl_rewrite_children 1
storeurl_rewrite_concurrency 140
storeurl_bypass on

hierarchy_stoplist (ini|ui|lst|inf||mh-|sc-)$ (afs.dat|update.txt|vdf.info.gz|captcha|reset.css|gamenotice|ickernew.css)
acl QUERY urlpath_regex -i \.(ini|ui|lst|inf|mh-|sc-)$
acl QUERY urlpath_regex -i (afs.dat|captcha|reset.css|update.txt|gamenotice|vdf.info.gz)
cache deny QUERY

#=========================================================
# TAG: Refresh Pattern
#=========================================================
# 1 year = 525600 mins, 1 month = 43200 mins, 1 day = 1440
#=========================================================
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?) 43200 999999% 43200 ignore-no-cache ignore-no-store ignore-private override-expire override-lastmod reload-into-ims store-stale
refresh_pattern (get_video\?|videoplayback\?id|videoplayback.*id|videodownload\?|\.flv?) 43200 999999% 43200 ignore-no-cache ignore-no-store ignore-private override-expire override-lastmod reload-into-ims store-stale
refresh_pattern \.(ico|video-stats) 43200 999999% 43200 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod ignore-must-revalidate negative-ttl=10080 store-stale
refresh_pattern \.etology\? 43200 999999% 43200 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern galleries\.video(\?|sz) 43200 999999% 43200 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern brazzers\? 43200 999999% 43200 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern \.adtology\? 43200 999999% 43200 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern ^.*(utm\.gif|ads\?|rmxads\.com|ad\.z5x\.net|bh\.contextweb\.com|bstats\.adbrite\.com|a1\.interclick\.com|ad\.trafficmp\.com|ads\.cubics\.com|ad\.xtendmedia\.com|\.googlesyndication\.com|advertising\.com|yieldmanager|game-advertising\.com|pixel\.quantserve\.com|adperium\.com|doubleclick\.net|adserving\.cpxinteractive\.com|syndication\.com|media.fastclick.net).* 43200 20% 43200 ignore-no-cache ignore-no-store ignore-private override-expire ignore-reload ignore-auth ignore-must-revalidate store-stale negative-ttl=40320 max-stale=10
refresh_pattern ^.*safebrowsing.*google  43200 999999% 43200 override-expire ignore-reload ignore-no-cache ignore-private ignore-auth ignore-must-revalidate negative-ttl=10080 store-stale
refresh_pattern ^http://((cbk|mt|khm|kh|mlt)[0-9]?)\.google\.co(m|\.uk) 43200 999999% 43200 override-expire ignore-reload ignore-private store-stale negative-ttl=10080
refresh_pattern ytimg\.com.*\.jpg 43200 999999% 43200 override-expire ignore-reload store-stale refresh_pattern images\.friendster\.com.*\.(png|gif) 43200 999999% 43200 override-expire ignore-reload store-stale
refresh_pattern garena\.com 43200 999999% 43200 override-expire reload-into-ims store-stale
refresh_pattern photobucket.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png) 43200 999999% 43200 override-expire ignore-reload store-stale
refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\? 43200 999999% 43200 ignore-no-cache override-expire override-lastmod store-stale
refresh_pattern mediafire.com\/images.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png) 43200 999999% 43200 reload-into-ims override-expire ignore-private store-stale
refresh_pattern ^http:\/\/images|pics|thumbs[0-9]\. 43200 999999% 43200 reload-into-ims ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
refresh_pattern ^http:\/\/www.onemanga.com.*\/ 43200 999999% 43200 reload-into-ims ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
refresh_pattern ^http://v\.okezone\.com/get_video\/([a-zA-Z0-9]) 43200 999999% 43200 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod ignore-must-revalidate negative-ttl=10080 store-stale

# ANTI VIRUS
refresh_pattern guru.avg.com/.*\.(bin)                                  1440 999999% 10080 ignore-no-cache ignore-no-store ignore-reload  reload-into-ims store-stale
refresh_pattern (avgate|avira).*(idx|gz)$                               1440 999999% 10080 ignore-no-cache ignore-no-store ignore-reload  reload-into-ims store-stale
##refresh_pattern ^http.*(\.kaspersky-labs\.com|\.geo\.kaspersky\.com).*(\.avc|\.kdc|\.klz|\.bz2|\.dat|\.dif) 1440 999999% 10080 ignore-no-cache ignore-no-store ignore-reload reload-into-ims store-stale
##refresh_pattern kaspersky.*\.avc$ 1440 999999% 10080 ignore-no-cache ignore-no-store ignore-reload reload-into-ims store-stale
##refresh_pattern kaspersky 1440 999999% 10080 ignore-no-cache ignore-no-store ignore-reload reload-into-ims store-stale refresh_pattern update.nai.com/.*\.(gem|zip|mcs)                        1440 999999% 10080 ignore-no-cache ignore-no-store ignore-reload  reload-into-ims store-stale
refresh_pattern ^http:\/\/liveupdate.symantecliveupdate.com.*\(zip)     1440 999999% 10080 ignore-no-cache ignore-no-store ignore-reload  reload-into-ims store-stale
refresh_pattern avast.com/.*\.(vpu|vpaa)                                1440 999999% 10080 ignore-no-cache ignore-no-store ignore-reload  reload-into-ims store-stale

## WINDOWS UPDATE
refresh_pattern windowsupdate.com/.*\.(cab|exe)                 10080 999999%  43200 ignore-no-cache ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern update.microsoft.com/.*\.(cab|exe)              10080 999999%  43200 ignore-no-cache ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern download.microsoft.com/.*\.(cab|exe)            10080 999999%  43200 ignore-no-cache ignore-no-store ignore-reload reload-into-ims store-stale

#images facebook
refresh_pattern -i \.facebook.com.*\.(jpg|png|gif) 129600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.fbcdn.net.*\.(jpg|gif|png|swf|mp3) 129600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern  static\.ak\.fbcdn\.net*\.(jpg|gif|png) 129600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/profile\.ak\.fbcdn.net*\.(jpg|gif|png) 129600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale

# games facebook
refresh_pattern ^http:\/\/apps.facebook.com.*\/    10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.zynga.com.*\/      10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.farmville.com.*\/  10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.ninjasaga.com.*\/  10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.mafiawars.com.*\/  10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.crowdstar.com.*\/  10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.popcap.com.*\/     10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale

#banner IIX
refresh_pattern ^http:\/\/openx.*\.(jp(e?g|e|2)|gif|pn[pg]|swf|ico|css|tiff?) 129600 99999% 129600 reload-into-ims  ignore-reload override-expire ignore-no-cache ignore-no-store  store-stale
refresh_pattern ^http:\/\/ads(1|2|3).kompas.com.*\/             43200 99999% 129600 reload-into-ims  ignore-reload override-expire ignore-no-cache ignore-no-store  store-stale
refresh_pattern ^http:\/\/img.ads.kompas.com.*\/                43200 99999% 129600 reload-into-ims  ignore-reload override-expire ignore-no-cache ignore-no-store  store-stale
refresh_pattern .kompasimages.com.*\.(jpg|gif|png|swf)          43200 99999% 129600 reload-into-ims  ignore-reload override-expire ignore-no-cache ignore-no-store  store-stale
refresh_pattern ^http:\/\/openx.kompas.com.*\/                  43200 99999% 129600 reload-into-ims  ignore-reload override-expire ignore-no-cache ignore-no-store  store-stale
refresh_pattern kaskus.\us.*\.(jp(e?g|e|2)|gif|png|swf)         43200 99999% 129600 reload-into-ims  ignore-reload override-expire ignore-no-cache ignore-no-store  store-stale
refresh_pattern ^http:\/\/img.kaskus.us.*\.(jpg|gif|png|swf)    43200 99999% 129600 reload-into-ims  ignore-reload override-expire ignore-no-cache ignore-no-store  store-stale

#IIX DOWNLOAD
refresh_pattern ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(mp3|rar|zip|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 43200 99999% 129600 reload-into-ims  ignore-reload override-expire ignore-no-cache ignore-no-store  store-stale ignore-auth

#All File
refresh_pattern -i \.(class|css|js|tif)(\?.*)?$ 1440 95% 100000080 reload-into-ims override-lastmod
refresh_pattern -i \.(jpe|jpg|jpeg|png|bmp|gif)(\?.*)?$ 0 95% 1000000080 reload-into-ims override-lastmod
refresh_pattern -i \.(tiff|mov|avi|qt|mpeg|3gp)(\?.*)?$ 0 95% 201600000 reload-into-ims override-lastmod
refresh_pattern -i \.(mpg|mpe|wav|au|mid|flv)(\?.*)?$ 0 95% 2016000 reload-into-ims override-lastmod
refresh_pattern -i \.(zip|gz|arj|lha|lzh)(\?.*)?$ 0 95% 2016000 reload-into-ims override-lastmod
refresh_pattern -i \.(rar|tgz|tar|exe|bin)(\?.*)?$ 0 95% 2016000 reload-into-ims override-lastmod
refresh_pattern -i \.(cab|psf|part|0*|swf|gz|grf|gpf)(\?.*)?$ 0 95% 2000160 reload-into-ims override-lastmod
refresh_pattern -i \.(pdf|rtf|doc|swf|txt|inf)(\?.*)?$ 1 95% 2016000 reload-into-ims override-lastmod
refresh_pattern -i \.(inc|cab|ad|hqx|dll)(\?.*)?$ 10080 95% 4320000 reload-into-ims override-lastmod
refresh_pattern -i \.(asp|acgi|pl|shtml|php3|php)(\?.*)?$ 2 20% 432000 reload-into-ims override-lastmod
refresh_pattern -i \.(ini)(\?.*)?$ 2 5% 10800 reload-into-ims override-lastmod

refresh_pattern -i (/cgi-bin/|\?)  0  0%  0
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       40%     40320

#==============================================
# TAG: Extra Tuning Configuration
#==============================================
header_access Accept-Encoding deny  all
client_persistent_connections off
server_persistent_connections on
half_closed_clients off
strip_query_terms off
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100
vary_ignore_expire on
reload_into_ims on
pipeline_prefetch on
#range_offset_limit 512 KB
read_timeout 30 minutes
client_lifetime 6 hours
negative_ttl 30 seconds
positive_dns_ttl 2 hours
negative_dns_ttl 1 minutes
pconn_timeout 15 seconds
request_timeout 1 minute
store_avg_object_size 13 KB
log_icp_queries off
ipcache_size 8192
ipcache_low 90
ipcache_high 95
log_fqdn off
fqdncache_size 1024
memory_pools off
forwarded_for on
logfile_rotate 1
store_dir_select_algorithm round-robin
#cache_effective_user nobody
#cache_effective_group nobody
max_filedescriptors 8192

uri_whitespace strip
shutdown_lifetime 10 seconds
load_check_stopen on
load_check_stcreate on
download_fastest_client_speed on

url_rewrite_program /usr/sbin/updxlrator
url_rewrite_children 60

##end of config

7. Configure networking
#Begin Script 1##################################################################################
#!/bin/bash
sysctl net.ipv4.ip_nonlocal_bind=1
sysctl net.ipv4.ip_forward=1
/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ip_conntrack
/sbin/modprobe nf_conntrack
/sbin/modprobe ipt_state
/sbin/modprobe ipt_limit
/sbin/modprobe ipt_LOG
/bin/echo &quot;262144&quot; &amp;amp;amp;gt; /proc/sys/vm/min_free_kbytes
/bin/echo &quot;60&quot; &amp;amp;amp;gt; /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_time_wait
/bin/echo &quot;3276822&quot; &amp;amp;amp;gt; /proc/sys/net/nf_conntrack_max
/bin/echo &quot;15&quot; &amp;amp;amp;gt; /proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout
/bin/echo &quot;90&quot; &amp;amp;amp;gt; /proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout_stream
/bin/echo &quot;300&quot; &amp;amp;amp;gt; /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established
#End Script 1##################################################################################

#Begin Script 2##################################################################################
#!/bin/bash

CACHE_PORT=&quot;8080&quot;
WAN=&quot;eth1&quot;
LAN=&quot;eth0&quot;
BRIDGE=&quot;br0&quot;

/bin/echo &quot;1&quot; &amp;amp;amp;gt; /proc/sys/net/ipv4/ip_forward

#########################################################################################################
# BRIDGE MODE - 2 INTERFACES - TPROXY ON
#########################################################################################################
#/sbin/iptables -t nat -F
#/sbin/iptables -t nat -X
#/sbin/iptables -t mangle -F
#/sbin/iptables -t mangle -X
#/sbin/ebtables -t broute -F
#/sbin/ebtables -t broute -X
#/sbin/iptables -t mangle -N DIVERT
#/sbin/iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
#/sbin/iptables -t mangle -A DIVERT -j MARK --set-mark 1
#/sbin/iptables -t mangle -A DIVERT -j ACCEPT
#/sbin/iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark 0x1/0x1 --on-port $CACHE_PORT
#/sbin/ebtables -t broute -A BROUTING -i $LAN -p ipv4 --ip-proto tcp --ip-dport 80 -j redirect --redirect-target ACCEPT
#/sbin/ebtables -t broute -A BROUTING -i $WAN -p ipv4 --ip-proto tcp --ip-sport 80 -j redirect --redirect-target ACCEPT

#########################################################################################################
# BRIDGE MODE - 2 INTERFACES - TPROXY OFF
#########################################################################################################
#/sbin/iptables -t nat -F
#/sbin/iptables -t nat -X
#/sbin/iptables -t mangle -F
#/sbin/iptables -t mangle -X
#/sbin/ebtables -t broute -F
#/sbin/ebtables -t broute -X
#/sbin/ebtables -t broute -A BROUTING -p IPv4 --ip-protocol 6 --ip-destination-port 80 -j redirect --redirect-target ACCEPT
#/sbin/iptables -t nat -A PREROUTING -i $BRIDGE -p tcp --dport 80 -j REDIRECT --to-port $CACHE_PORT

#########################################################################################################
# GATEWAY MODE - 2 INTERFACES - TPROXY ON
#########################################################################################################
#/sbin/iptables -t nat -F
#/sbin/iptables -t nat -X
#/sbin/iptables -t mangle -F
#/sbin/iptables -t mangle -X
#/sbin/ebtables -t broute -F
#/sbin/ebtables -t broute -X
#/sbin/iptables -t mangle -N DIVERT
#/sbin/iptables -t mangle -A DIVERT -j MARK --set-mark 1
#/sbin/iptables -t mangle -A DIVERT -j ACCEPT
#/sbin/iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
#/sbin/iptables -t mangle -A PREROUTING -i $LAN -p tcp --dport 80 -j TPROXY --tproxy-mark 1 --on-port $CACHE_PORT
#/sbin/ip rule add fwmark 1 lookup 100
#/sbin/ip route add local 0.0.0.0/0 dev lo table 100
#/bin/echo 1 &amp;amp;amp;gt; /proc/sys/net/ipv4/conf/$WAN/proxy_arp

#########################################################################################################
# GATEWAY MODE - 2 INTERFACES - TPROXY OFF
#########################################################################################################
#/sbin/iptables -t nat -F
#/sbin/iptables -t nat -X
#/sbin/iptables -t mangle -F
#/sbin/iptables -t mangle -X
#/sbin/ebtables -t broute -F
#/sbin/ebtables -t broute -X
#/sbin/iptables -t nat -A PREROUTING -i $LAN -p tcp --dport 80 -j REDIRECT --to-port $CACHE_PORT
#/sbin/iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE
#End Script
#########################################################################################################
</pre>
<p>References:<br />
http://www.icez.net/blog/477/lusca-cdn-installation  # Good startup conf. Need to adapt for ubuntu server</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://xxxl.co.za/?feed=rss2&#038;p=20</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
