lunedì 24 marzo 2014

Modifica hotspot per mancata generazione reports

edit /etc/chilli/ipup.sh and change the following line

ipt -I PREROUTING -t nat -i $TUNTAP -p tcp -s $NET/$MASK -d ! $ADDR –dport
80 -j REDIRECT --to 3128

to

ipt -I PREROUTING -t nat -i $TUNTAP -p tcp -s $NET/$MASK ! -d $ADDR –dport
80 -j REDIRECT --to 3128

The key for those who can't see the difference is the exclamation mark after
the -d, is now before the -d.

Installation de ZoneMinder 1.26.4 sous Debian Wheezy

Zoneminder est une solution open-source de vidéo-surveillance, qui accepte des sources vidéo de type analogiques via des cartes d’acquisitions ou numérique comme des webcams ou des caméras IP.

La visionnage des acquisitions vidéo ainsi que le contrôle du système vidéo-surveillance se fait à travers une interfaces web.
ZoneMinder est capable d’envoyer automatiquement des alertes et les captures d’images par mail ou FTP, il existe aussi des applications Android pour être avertis.

ZoneMinder est présent dans les dépôts officiels de Debian mais à la version 1.25.4, qui date du 26 Aout 2011 et ne bénéficie pas des dernières corrections de bug.

Cet article décrit l’installation de ZoneMinder version 1.26.4 sous Debian Wheezy.
Installation d’une Debian de base sans bureau.

Voir cet article pour l’installation de Debian: Debian 7
Installation des dépendances de ZoneMinder.

apt-get install -y apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm subversion automake autoconf libjpeg8-dev libjpeg8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libphp-serialization-perl libgnutls-dev libjpeg8-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libv4l-dev libtool ffmpeg libnetpbm10-dev libavdevice-dev libmime-lite-perl dh-autoreconf dpatch
Création d’un paquet .deb de ZoneMinder 1.26.4.

    Téléchargement sur le github de ZoneMinder:
    git clone https://github.com/ZoneMinder/ZoneMinder.git zoneminder
 
Entrer dans le répertoire:
cd zoneminder/

Création d’un lien symbolique du répertoire debian:
ln -s distros/debian

Vérification des dépendances:
pkg-checkbuilddeps

Création du paquet .deb de ZoneMinder:
dpkg-buildpackage

Installation de ZoneMinder.

Remonter d’un cran dans l’arborescence du répertoire courant:
cd ..

Installation du paquet ZoneMinder:
dpkg -i zoneminder_1.26.4-1_*.deb

Si des erreurs lors de l’installation:
apt-get install -f

Reconfigurer ZoneMinder:
dpkg-reconfigure zoneminder

Vérification du status de ZoneMinder:
/etc/init.d/zoneminder status

ZoneMinder is running

Configuration du serveur web Apache.

Création d’un lien symbolique de la configuration Apache pour ZoneMinder:
ln -s /etc/zm/apache.conf /etc/apache2/sites-enabled/zoneminder.conf

Relance d’Apache:
service apache2 restart

ZoneMinder est installé!

Indiquer l’url du serveur dans un navigateur: http://url_server/zm/


domenica 23 marzo 2014

My 2 Speedy ADSL & Zeroshell Load Balancing Failover

Here're my experience with Zeroshell. I had mikrotik balancing before, but seem its too complicated for a newbie. Then I decided to try this Zeroshell, and its works great.. :)
I had 2 ADSL connection at the office, and want to maximize its utilization. Here are my config :


Two speedy connection with @1Mbps speed

Speedy1 speed


Speedy2 speed


Now come the zeroshell configuration
You should have visited http://www.zeroshell.net/, before come to this. I had my Zeroshell running through usb HD stick. Quiet handy actually, you could also installed it on HD but I quiet comfort with the USB stick.

Network Interface IP setup

DHCP setting


Router setup (static gateway setting)


It even work without static route (so maybe it doesn't need static route)


Most important the NAT-thing…I was able to do it by enabling NAT on all interface, I’ld to test if its work with only one interface being NAT-ed (ETH01).


The NetBalancer the fun stuff ;)
Make sure you see that Failover Monitor status is Active


Balancing rule, need to activate also..this is mine look like


Another sign if Balancing is working, traffic is flooding to the the two interface


Last fun Stuff
The Speed Test…it shows that I had over 1Mbps download speed, the goal I pursued with this Zeroshell.

Result after success setting the Zeroshell


What more interesting is Failover do work. When one link down connection is still up using the other link.


Connection is doing all right using the failover link