<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mezgani blog</title>
	<atom:link href="http://securfox.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://securfox.wordpress.com</link>
	<description>Hey what is up, figured I my tis well be the first one to put something in here.</description>
	<lastBuildDate>Fri, 14 Jun 2013 19:17:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='securfox.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/666501f0d13b19a3fc24a5e7547bd488?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Mezgani blog</title>
		<link>http://securfox.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://securfox.wordpress.com/osd.xml" title="Mezgani blog" />
	<atom:link rel='hub' href='http://securfox.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Installing smog mongodb viewer</title>
		<link>http://securfox.wordpress.com/2013/02/12/installing-smog-mongodb-viewer/</link>
		<comments>http://securfox.wordpress.com/2013/02/12/installing-smog-mongodb-viewer/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 02:02:19 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[nodejs npm smog]]></category>
		<category><![CDATA[smog mongodb viewer]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=580</guid>
		<description><![CDATA[First of all install dependency packages sudo apt-get update &#38;&#38; apt-get install git-core curl build-essential openssl libssl-dev Install Node.js &#38; NPM git clone https://github.com/joyent/node.git cd node Run git tag to show all available versions git tag -l select the latest stable. git checkout v0.9.9 Run configure and make ./configure make sudo make install Get npm [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=580&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>First of all install dependency packages<br />
<strong>sudo apt-get update &amp;&amp; apt-get install git-core curl build-essential openssl libssl-dev<br />
</strong></p>
<p>Install Node.js &amp; NPM<br />
<strong>git clone <a href="https://github.com/joyent/node.git" rel="nofollow">https://github.com/joyent/node.git</a><br />
cd node</strong></p>
<p>Run git tag to show all available versions<br />
<strong>git tag -l</strong></p>
<p>select the latest stable.<br />
<strong>git checkout v0.9.9</strong></p>
<p>Run configure and make<br />
<strong>./configure<br />
make<br />
sudo make install</strong></p>
<p>Get npm Node package manager using curl<br />
<strong>curl <a href="https://npmjs.org/install.sh" rel="nofollow">https://npmjs.org/install.sh</a> | sudo sh</strong></p>
<p>Install smog using node package manager by running<br />
<strong>npm install smog -g</strong></p>
<p>Start smog on background:<br />
<strong>smog&amp;</strong></p>
<p>smog will start on default port 8080</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/580/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=580&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2013/02/12/installing-smog-mongodb-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>
	</item>
		<item>
		<title>Repair mongodb on a bad shutdown</title>
		<link>http://securfox.wordpress.com/2013/02/12/repair-mongodb-on-a-bad-shutdown/</link>
		<comments>http://securfox.wordpress.com/2013/02/12/repair-mongodb-on-a-bad-shutdown/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 01:24:07 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[repair mongodb]]></category>
		<category><![CDATA[Repair mongodb on a bad shutdown]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=578</guid>
		<description><![CDATA[On my Debian box i run, and that should work also on Ubuntu : sudo rm /var/lib/mongodb/mongod.lock sudo mongod &#8211;dbpath /var/lib/mongodb &#8211;repair sudo chown mongodb /var/lib/mongodb/* sudo service mongodb start<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=578&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>On my Debian box i run, and that should work also on Ubuntu :</p>
<p><strong>sudo rm /var/lib/mongodb/mongod.lock<br />
sudo mongod &#8211;dbpath /var/lib/mongodb &#8211;repair<br />
sudo chown mongodb /var/lib/mongodb/*<br />
sudo service mongodb start<br />
</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/578/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=578&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2013/02/12/repair-mongodb-on-a-bad-shutdown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create an Apache Module</title>
		<link>http://securfox.wordpress.com/2013/02/11/how-to-create-an-apache-module/</link>
		<comments>http://securfox.wordpress.com/2013/02/11/how-to-create-an-apache-module/#comments</comments>
		<pubDate>Mon, 11 Feb 2013 20:49:29 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[Apache module]]></category>
		<category><![CDATA[apache module exampke]]></category>
		<category><![CDATA[apxs usage]]></category>
		<category><![CDATA[create simple apache module]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=576</guid>
		<description><![CDATA[1. Use apxs2 to create a skeleton module named mod_hello: apxs2 -g -n hello 2. Modify the automatically generated mod_hello.c file: 3. Run make and install the .so file into Apache&#8217;s libexec directory apxs2 -iac mod_hello.c 4. Modify httpd.conf to load the module and to install it as the content handler for the URL of [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=576&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>1. Use apxs2 to create a skeleton module named mod_hello:<br />
<strong> apxs2 -g -n hello</strong></p>
<p>2. Modify the automatically generated mod_hello.c file:<br />
3. Run make and install the .so file into Apache&#8217;s libexec directory<br />
<strong> apxs2 -iac mod_hello.c</strong><br />
4. Modify httpd.conf to load the module and to install it as the content handler for the URL of your choice:</p>
<p># httpd.conf<br />
<strong>LoadModule   hello_module    libexec/mod_hello.so</strong></p>
<p><strong>&lt;Location /hello_demo&gt;</strong><br />
<strong>  SetHandler hello</strong><br />
<strong>&lt;/Location&gt;</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/576/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/576/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=576&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2013/02/11/how-to-create-an-apache-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>
	</item>
		<item>
		<title>How to deploy PHP/MySQL web application with several external dependancies, across multiple Linux platforms</title>
		<link>http://securfox.wordpress.com/2013/02/08/how-to-deploy-phpmysql-web-application-with-several-external-dependancies-across-multiple-linux-platforms/</link>
		<comments>http://securfox.wordpress.com/2013/02/08/how-to-deploy-phpmysql-web-application-with-several-external-dependancies-across-multiple-linux-platforms/#comments</comments>
		<pubDate>Fri, 08 Feb 2013 22:41:30 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[capistrano deploy]]></category>
		<category><![CDATA[composer dependencies]]></category>
		<category><![CDATA[deploy web application]]></category>
		<category><![CDATA[deploy web application on multi server]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=564</guid>
		<description><![CDATA[If you would create a deployment system for PHP/MySQL web application with several external dependancies, across multiple *nix platforms usually you can use rsync or may be scp, git, and pear for dependencies and some custom scripts. In the fact, there are a nice solution and interesting one based on three tools : capistrano, jenkins [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=564&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>If you would create a deployment system for PHP/MySQL web application with several external dependancies, across multiple *nix platforms usually you can use rsync or may be scp, git, and pear for dependencies and some custom scripts.</p>
<p>In the fact, there are a nice solution and interesting one based on three tools : <a title="capistrano" href="http://capistranorb.com/" target="_blank"><strong>capistrano</strong></a>, <a title="jenkins" href="http://jenkins-ci.org/" target="_blank"><strong>jenkins</strong></a> and <a title="composer" href="https://getcomposer.org/" target="_blank"><strong>composer</strong></a></p>
<p>Capistrano to deploy project to remote servers and be able to rollback when screw up.<br />
Capistrano is a nice ruby application that can perform pre and post-deploy functions like restarting webserver, busting cache, renaming files, running database migrations, with capistrano we can easily copy code from source ( control repository ) to production server.</p>
<p>Capistrano by itself isn’t enough to make my deployment complete, that why my capistrano script will runs composer on the app to gather dependencies. </p>
<p>First , you can get capistrano using gem like that:<br />
<strong>sudo gem install capistrano</strong><br />
<strong>sudo gem install capistrano-ext</strong></p>
<p>You may get composer using git like this, run :<br />
<strong>git clone <a href="https://github.com/composer/composer.git" rel="nofollow">https://github.com/composer/composer.git</a></strong></p>
<p>In general, you&#8217;ll use Capistrano as follows:</p>
<p>You will create a recipe file (&#8220;capfile&#8221; or &#8220;Capfile&#8221;) usgin capify command line as follow :<br />
<strong>capify .</strong><br />
This will create config directory and a deploy.rb file that we will edit<br />
<strong>vim confing/deploy.rb</strong></p>
<p>deploy.rb is ruby file with a very simple syntax, here is my recipe file that i use to deploy my blog:</p>
<pre><code>

set :application, "blog"
#You probably want to change this to be the location of the repo you just forked
set :repository,  "git://github.com/WordPress/WordPress.git"

set :php_bin, "/usr/bin/php"

#The following is not the document root, but just the app root 
set :deploy_to, "/home/mezgani/www/#{application}/"

set :current, "/home/mezgani/www/#{application}/current"

role :web, "server1", "server2"                          # Your HTTP server, Apache/etc
role :app, "server1", "server2"                          # This may be the same as your `Web` server
role :db,  "database-server", :primary =&gt; true # This is where Rails migrations will run
role :db,  "database-server"

set :local_path, "/home/mezgani/config/wordpress/config"

# SSH Settings
set :user, "mezgani"
#set :password, "password"
ssh_options[:keys] = %w(/home/user/.ssh/id_rsa) # SSH key
ssh_options[:port] = 22

#########################
#things you'll probably not change, unless you know what you're doing 
###########################
# If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion
set :scm, :git

#the following is needed because if it's not there, for some reason we don't get
#asked to accept the key from github..annoying when deploying to a new server
default_run_options[:pty] = true

#since this is PHP, we don't really need to restart apache or anything
set :use_sudo, true 

#ssh agent forwarding..
ssh_options[:forward_agent] = true

#A lot of this stuff has been overridden for PHP/Non Rails magic

namespace :deploy do
  
  task :default do
    update
    finalize_update
    composer
  end
  
  
  task :finalize_update, :except =&gt; { :no_release =&gt; true } do
    run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
    run "cp -fr #{current}/wp-content #{shared_path}/"
    run "cp #{current}/.htaccess #{shared_path}/"
    run "cp #{current}/wp-config.php #{shared_path}/configs/"
    run "cp #{shared_path}/configs/wp-config.php #{latest_release}/"
    run "cp -fr #{shared_path}/wp-content #{latest_release}/"
    run "chmod -R 777 #{latest_release}/wp-content"
    run "cp #{shared_path}/.htaccess #{latest_release}/"
  end
end 

task :composer do
  top.upload("#{local_path}/composer.json", "#{shared_path}/install", {:via =&gt; :scp, :recursive =&gt; true})
  run "cd #{shared_path}/install &amp;&amp; curl -s http://getcomposer.org/installer | #{php_bin}"
  run "cd #{shared_path}/install &amp;&amp; ./composer.phar install"
end

task :setup do
  run "sudo apt-get install curl"
  run "mkdir #{shared_path}/"
  run "mkdir #{shared_path}/install/"
  run "mkdir #{shared_path}/configs/"
  
  set(:wp_environment_ready, Capistrano::CLI.ui.ask("Is wp-config.php ready for this environment? (yes/no): "))
  if wp_environment_ready == 'yes'
    #top.upload("htdocs/wp-config.php", "#{shared_path}/configs/wp-config.php", :via =&gt; :scp)
    run "cp #{deploy_to}/wp-config.php #{shared_path}/configs/wp-config.php "
  end
  run "mkdir #{shared_path}/wp-content"
  run "mkdir #{shared_path}/wp-content/uploads"
end
</pre>
<p></code></p>
<p>Before deploy we have to define a composer.json file that defines all<br />
the dependencies my application has, whether they’re composer enabled or not.</p>
<p>Edit composer.json, specify your dependencies and run composer on capistrano to get the dependencies:<br />
<strong>vim composer.json</strong></p>
<p>Finally, use the cap script to execute your recipe. Use the cap script as follows:<br />
<strong>cap deploy</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/564/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=564&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2013/02/08/how-to-deploy-phpmysql-web-application-with-several-external-dependancies-across-multiple-linux-platforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>
	</item>
		<item>
		<title>HSRP simple example</title>
		<link>http://securfox.wordpress.com/2012/06/25/hsrp-simple-example/</link>
		<comments>http://securfox.wordpress.com/2012/06/25/hsrp-simple-example/#comments</comments>
		<pubDate>Mon, 25 Jun 2012 00:48:11 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[routing]]></category>
		<category><![CDATA[example hsrp]]></category>
		<category><![CDATA[hsrp cisco example]]></category>
		<category><![CDATA[HSRP simple example]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=541</guid>
		<description><![CDATA[Let&#8217;s talk about too routers A and B that use the HSRP protocole against tolerance fault and attack. The router A use the IP address 192.168.0.2 with a mask 255.255.255.0 The router B use the IP address 192.168.0.3 with a mask 255.255.255.0 So, the virtual IP address is 192.168.0.1 and is set as default gateway [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=541&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Let&#8217;s talk about too routers A and B that use the HSRP protocole against tolerance fault and attack.<br />
<a href="http://securfox.files.wordpress.com/2012/06/hsrp.png"><img src="http://securfox.files.wordpress.com/2012/06/hsrp.png?w=300&#038;h=207" alt="" title="hsrp" width="300" height="207" class="alignright size-medium wp-image-542" /></a><br />
The router A use the IP address 192.168.0.2 with a mask 255.255.255.0<br />
The router B use the IP address 192.168.0.3 with a mask 255.255.255.0</p>
<p>So, the virtual IP address is 192.168.0.1 and is set as default gateway as:</p>
<p><strong>Router A</strong><br />
interface Ethernet 0/0<br />
ip address 192.168.0.2 255.255.255.0<br />
standby 10 priority 100 preempt<br />
standby 10 ip 192.168.0.1</p>
<p><strong>Router B</strong><br />
interface Ethernet 0/0<br />
ip address 192.168.0.3 255.255.255.0<br />
standby 10 priority 80<br />
standby 10 ip 192.168.0.1</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/541/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=541&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2012/06/25/hsrp-simple-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>

		<media:content url="http://securfox.files.wordpress.com/2012/06/hsrp.png?w=300" medium="image">
			<media:title type="html">hsrp</media:title>
		</media:content>
	</item>
		<item>
		<title>Upgrade FreeBSD 8.1 to 9.0 stable release</title>
		<link>http://securfox.wordpress.com/2012/06/20/upgrade-freebsd-8-1-to-9-0-stable-release/</link>
		<comments>http://securfox.wordpress.com/2012/06/20/upgrade-freebsd-8-1-to-9-0-stable-release/#comments</comments>
		<pubDate>Wed, 20 Jun 2012 00:54:31 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[system]]></category>
		<category><![CDATA[upgrade freebsd]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=534</guid>
		<description><![CDATA[For upgrading my FreeBSD box i use the binary freebsd-update. Well, i logged as root and i type: # freebsd-update upgrade -r 9.0-RELEASE # freebsd-update fetch # freebsd-update install # reboot The system will reboot with the new kernel after the reboot, run freebsd-update install again to install userland components and rebbot # freebsd-update install [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=534&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For upgrading my FreeBSD box i use the binary freebsd-update. Well, i logged as root and i type:</p>
<p><strong># freebsd-update upgrade -r 9.0-RELEASE<br />
# freebsd-update fetch<br />
# freebsd-update install<br />
# reboot</strong></p>
<p>The system will reboot with the new kernel after the reboot, run freebsd-update install again<br />
to install userland components and rebbot</p>
<p><strong># freebsd-update install<br />
# reboot</strong></p>
<p>You also need to update all packages, type:<br />
<strong># portsnap fetch update<br />
# pkg_version -vIL=<br />
# portupgrade -a</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/534/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/534/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=534&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2012/06/20/upgrade-freebsd-8-1-to-9-0-stable-release/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>
	</item>
		<item>
		<title>Installation of mod_evasive on cPanel/WHM</title>
		<link>http://securfox.wordpress.com/2012/05/16/installation-of-mod_evasive-on-cpanelwhm/</link>
		<comments>http://securfox.wordpress.com/2012/05/16/installation-of-mod_evasive-on-cpanelwhm/#comments</comments>
		<pubDate>Wed, 16 May 2012 17:18:15 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[anti ddos apache]]></category>
		<category><![CDATA[anti ddos attack apache]]></category>
		<category><![CDATA[mod_evasive apache]]></category>
		<category><![CDATA[mod_evasive on cpanel]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=528</guid>
		<description><![CDATA[This article is about installing of apache&#8217;s mod_evasive on cpanel/whm, to help against DOS and DDOS attack. Get the latest source of mod_evasive $ wget http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz $ tar zxvf mod_evasive_1.10.1.tar.gz $ cd mod_evasive Load mod_evasive into apache $ /usr/local/apache/bin/apxs -i -a -c mod_evasive20.c Next, distill the module to apache $ /usr/local/cpanel/bin/apache_conf_distiller &#8211;update Last, edit apache [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=528&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This article is about installing of apache&#8217;s mod_evasive on cpanel/whm, to help against DOS and DDOS attack.</p>
<p>Get the latest source of mod_evasive<br />
<strong>$ wget <a href="http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz" rel="nofollow">http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz</a><br />
$ tar zxvf mod_evasive_1.10.1.tar.gz<br />
$ cd mod_evasive</strong></p>
<p>Load mod_evasive into apache<br />
<strong>$ /usr/local/apache/bin/apxs -i -a -c mod_evasive20.c</strong></p>
<p>Next, distill the module to apache<br />
<strong>$ /usr/local/cpanel/bin/apache_conf_distiller &#8211;update</strong></p>
<p>Last, edit apache config file<br />
<strong>$ vim /usr/local/apache/conf/httpd.conf</strong></p>
<p>and Add this directive<br />
<strong><br />
&lt;IfModule mod_evasive20.c&gt;<br />
DOSHashTableSize 3097<br />
DOSPageCount 2<br />
DOSSiteCount 50<br />
DOSPageInterval 1<br />
DOSSiteInterval 1<br />
DOSBlockingPeriod 3600<br />
DOSEmailNotify admin@domain.tld<br />
DOSSystemCommand &#8220;sudo /sbin/iptables -A INPUT -s %s -j DROP&#8221;<br />
DOSLogDir &#8220;/var/log/evasive/&#8221;<br />
&lt;/IfModule&gt;<br />
</strong></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/528/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=528&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2012/05/16/installation-of-mod_evasive-on-cpanelwhm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>
	</item>
		<item>
		<title>A Method for Transmissing PPP Over Ethernet (PPPoE) (RFC2516)</title>
		<link>http://securfox.wordpress.com/2011/01/22/a-method-for-transmissing-ppp-over-ethernet-pppoe-rfc2516/</link>
		<comments>http://securfox.wordpress.com/2011/01/22/a-method-for-transmissing-ppp-over-ethernet-pppoe-rfc2516/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 01:48:00 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[informational]]></category>
		<category><![CDATA[rfc]]></category>
		<category><![CDATA[Transmissing PPP Over Ethernet]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=510</guid>
		<description><![CDATA[Publication date : February 1999 RFC Author(s) : R.Wheeler, D.Simone, D. Carrel, J. Evarts, K. Lidl, L. Mamakos Category : informational The Point-to-point Protocol (PPP) provides a standard method for transporting multi-protocol datagrams over point-to-point links. PPPoE has two differents stages, first one is PPP Discovery stage that contains four steps when a host discovers [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=510&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Publication date : February 1999<br />
RFC Author(s)    : R.Wheeler, D.Simone, D. Carrel, J. Evarts, K. Lidl, L. Mamakos<br />
Category            : informational</p>
<p>The Point-to-point Protocol (PPP) provides a standard method for  transporting multi-protocol datagrams over point-to-point links.</p>
<p>PPPoE has two differents stages, first one is PPP Discovery stage that contains four steps when a host discovers the MAC address of peer (Concentrator) and the PPPoE session ID.<br />
In the fact, the Mac address and PPPoE_SESSION_ID uniquely define a  ession.<br />
The relationship between the peers is a simple client/server when a client asks server(Concentrator) for informations to establish<br />
the session. </p>
<p>The Frame sent is a simple Ethernet frame where the ETHER_TYPE is  set to either 0&#215;8863 (Discovery Stage) or 0&#215;8864 (PPP Session Stage).</p>
<p>Here is the Ethernet Payload for PPPoE:<br />
[ VER:4 | TYPE:4 | CODE:8 | SESSION_ID:16 | LENGTH:16 | PAYLOAD:16 ]</p>
<p>Discovery Stage : Ethernet Frame have the ETHER_TYPE field set to 0&#215;8863</p>
<p> 1. Client to server: Initiation (PPPoE Active Discovery Initiation)<br />
    PADI:<br />
    * Host send a broadcast packet, with the code field set to 0&#215;09<br />
    * The session id set to 0&#215;0000</p>
<p> 2. Server to client: Offer (PPPoE Active Disocvery Offer)<br />
    PADO:<br />
    * Access Concentrator reply to an unicast address, with code set to 0&#215;07<br />
    * The session id set to 0&#215;0000<br />
    * PADO packet contains AC-Name TAG, Service-Name TAG </p>
<p> 3. Client to server: Request (PPPoE Active Discovery Request)<br />
    PADR:<br />
    * Host receive one or more PADO packet and has to choice one<br />
    * Choice is based on AC-Name or Services offred<br />
    * Host send one PADR packet to Concentrator<br />
    * Destination is the unicat Ethernet address of Cencentrator<br />
    * code field is set to 0&#215;19 and session id is set to 0&#215;0000</p>
<p> 4. Server to client: Session-confirmation (PPPoE Active Discovery Session-confirmation)<br />
    PADS:<br />
    * When Access receive PADR it prepare to begin PPP session<br />
    * generate a unique session id<br />
    * reply with an unicat Ethernet address<br />
    * code field is set to 0&#215;65<br />
    * contains exactly one TAG of TAG_TYPE Service-Name</p>
<p> 5. Either end to other end: Termination (PADT)<br />
    * packet sent bu host or Access Concentrator<br />
    * session is established<br />
    * Destination address is unicast<br />
    * session is the SESSION_ID generated<br />
    * code field is set to 0xa7</p>
<p>Examples Using scapy:<br />
1. PADI:<br />
sendp(Ether(type=0&#215;8863,src=&#8221;00:60:4c:72:e7:69&#8243;,dst=&#8221;ff:ff:ff:ff:ff:ff&#8221;)/PPPoED(code=0&#215;09,sessionid=0&#215;0000),iface=&#8221;nas0&#8243;)</p>
<p>PADO:<br />
2. sendp(Ether(type=0&#215;8863,src=&#8221;00:bf:12:fa:90:fd&#8221;, dst=&#8221;00:60:4c:72:e7:69&#8243;)/PPPoED(code=0&#215;07,sessionid=0&#215;0000),iface=&#8221;nas0&#8243;)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/510/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/510/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=510&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2011/01/22/a-method-for-transmissing-ppp-over-ethernet-pppoe-rfc2516/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>
	</item>
		<item>
		<title>EtherIP: Tunneling Ethernet Frames in IP Datagrams (RFC3378)</title>
		<link>http://securfox.wordpress.com/2011/01/05/etherip-tunneling-ethernet-frames-in-ip-datagrams-rfc3378/</link>
		<comments>http://securfox.wordpress.com/2011/01/05/etherip-tunneling-ethernet-frames-in-ip-datagrams-rfc3378/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 10:05:28 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[rfc]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=503</guid>
		<description><![CDATA[Publication date : September 2002 RFC Author(s) : R.Housley, S.Hollenbeck Category : informational EtherIP protocol developed in 1991, and used to tunnel Ethernet and IEEE 802.3 media access control (MAC) frames (including IEEE 802.1Q [VLAN] datagrams) across an IP internet. The EtherIP datagrams contains 16-bit header and a variable-length encapsulated Ethernet or IEEE 802.3 frame [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=503&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Publication date  : September 2002<br />
RFC Author(s)     : R.Housley, S.Hollenbeck<br />
Category             : informational</strong></p>
<p>EtherIP protocol developed in 1991, and used to tunnel Ethernet and IEEE 802.3 media access control (MAC) frames (including IEEE 802.1Q [VLAN] datagrams) across an IP internet.</p>
<p>The EtherIP datagrams contains  16-bit header and a variable-length encapsulated Ethernet or IEEE 802.3 frame that immediately follows IP fields.</p>
<p>The 16-bit of EtherIP header contains two fields, the version 4-bit that must be set to 3 (0011) and 12-bit reserved reserved for future that have to be set to zero, for encapsulation and decapsulation operations. An IP datagram with a EtherIP header must set the IPv4 protocol to 97 (decimal).</p>
<p>The brigde-like station must listen for IP datagram that contains the protocol 97 and ignore the rest LAN frames. if this case it extract MAC from datagrams on the LAN and calculate the (FCS) frame check sequence even the IP checksum does not provide integrity protection for Ethernet/IEEE 802.3, and append the frame as part of data link layer.</p>
<p>One security consideration solution is to protect the IP datagram that carry  EtherIP with IPsec [RFC2401].</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/503/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=503&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2011/01/05/etherip-tunneling-ethernet-frames-in-ip-datagrams-rfc3378/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending text message using AT command</title>
		<link>http://securfox.wordpress.com/2011/01/02/sending-text-message-using-at-command/</link>
		<comments>http://securfox.wordpress.com/2011/01/02/sending-text-message-using-at-command/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 17:00:03 +0000</pubDate>
		<dc:creator>Ali MEZGANI</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[at command linux]]></category>
		<category><![CDATA[modem mesasge text]]></category>
		<category><![CDATA[send message text]]></category>

		<guid isPermaLink="false">http://securfox.wordpress.com/?p=495</guid>
		<description><![CDATA[Playing with my USB dongle that is a 3g modem, i felt the need to send message using this modem. but i saw that it has no support to send message using AT command, well to check this use the AT+CSMS command before any shake. In the case when you have a GSM/GPRS modem/mobile phone [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=495&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Playing with my USB dongle that is a 3g modem, i felt the need to send message using this modem.<br />
but i saw that it has no support to send message using AT command, well to check this use the AT+CSMS command before any shake.</p>
<p>In the case when you have a GSM/GPRS modem/mobile phone with full support of what we talk about before :<br />
You can easily sending message using the great Kannel, or from scratch:<br />
In this article we will focus on how to send message using AT command and we can resume this in five steps :<br />
1. Initializing the modem<br />
2. Setting SMSC<br />
3. Storing the message into storage<br />
4. Sending<br />
5. Delete the message from storage</p>
<p>First of all, to interact with the device you need a serial tools like screen or may be minicom.<br />
Well i recommend the use of screen when you work on pseudo devices :</p>
<p>Let&#8217;s connect to the device (ttyUSB0) using screen with a baud of 9600 :<br />
<strong>$ screen /dev/ttyUSB0 9600</strong></p>
<p>1. Send the initialize strings :<br />
AT<br />
OK<br />
ATZ<br />
OK</p>
<p>2. Define the service center address as follow and verify that it is correct:<br />
AT+CSCA=&#8221;+85290000000&#8243;,145</p>
<p>145 means that we deal with formatted address using typical ISDN/telephony numbering plan<br />
(ITU E.164/E.163) and it is an international number.</p>
<p>3. In the fact if you may send a text messages to +85291234567, write the message first to storage area, as like as:<br />
AT+CMGW=&#8221;+85291234567&#8243;,145,&#8221;STO UNSENT&#8221;Hello world </p>
<p>4. And finally you can now send the message, referenced with it index:<br />
AT+CMSS=3</p>
<p>You can also do this if you rather to send it to mutli destinations:<br />
AT+CMSS=3,&#8221;91234567&#8243;<br />
AT+CMSS=3,&#8221;97777777&#8243;<br />
AT+CMSS=3,&#8221;96666666&#8243;</p>
<p>Lastly, delete the message from storage area.<br />
5. AT+CMGD=3</p>
<p>To read the first message indexed with 1 :<br />
AT+CMGR=1</p>
<p>Also if you need to play or list all the message in the storage<br />
AT+CMGL=&#8221;ALL&#8221;</p>
<p><a href="http://www.developershome.com/sms"><br />
Great document about this can be found here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securfox.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securfox.wordpress.com/495/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securfox.wordpress.com&#038;blog=2198132&#038;post=495&#038;subd=securfox&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securfox.wordpress.com/2011/01/02/sending-text-message-using-at-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/44c0ad27ea3da8ed33517faed892646c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Handrix</media:title>
		</media:content>
	</item>
	</channel>
</rss>
