Enable mod_rewrite on Apache for Debian

To enable and load mod_rewrite, do the following.

$ sudo a2enmod rewrite

Then open up the following file, and replace every occurrence of “AllowOverride None” with “AllowOverride all”.

$ sudo vi /etc/apache2/sites-available/default

or

$ sudo vi /etc/apache2/sites-available/000-default

Finally, restart Apache2.

$ sudo service apache2 restart
Share

NMAP Security Scanner on Linux

First of all, you should get the “nmap” package installed in your system.

On CentOS

yum install nmap

On Debian

apt-get install nmap

On Ubuntu

sudo apt-get install nmap

NMAP Commands:

sudo nmap -sS [IP address] or [website address]
sudo nmap -O --osscan-guess [IP address] or [website address]
sudo nmap -vv [IP address] or [website address]

sudo nmap -sV [IP address] or [website address]

nmap -sn 192.168.1.0/24 or nmap -sP 192.168.1.0/24

Read more

Share

PEN: HTTP Load Balancer

This is performed on a CentOS 6.x 64 bit machine

Install pen which is lightweight simple Load Balancing software.

It is TCP protocol based, so it’s possible to balance not only HTTP but SMTP, FTP, LDAP and so on. This example is based on the environment like follows.

Pen-LB-Capture

Configure Pen to load balance to Backend#1, Backend#2, Backend#3 web servers.

Read more

Share

Zimbra Increasing Attachment Size works for 8.5

Through zimbraGUI didn’t find it how to do it, but through console it appeared to be working with the following set of commands to modify postfix actually-

su zimbra 
zmprov mcf zimbraMtaMaxMessageSize 20971520 
zmprov mcf zimbraFileUploadMaxSize 20971520 
zmprov mcf zimbraMailContentMaxSize 52428800 
zmprov modifyConfig zimbraMtaMaxMessageSize 52428800 
postfix reload

Once theyre executed, restart the server (restarting zimbra won’t reflect the changes made, so need a fresh reboot of OS)

Share

Two Default Gateways on One System

Problem Description

You have built two or more network cards into one Linux system and each of these cards has its own default gateway. By default, you can only have one default gateway on a system. The case described would lead to asynchronous routing, whereby the router would reject the packets as appropriate.

Solution

The iproute2 program, which is included in all current Linux distributions and already installed even, as a rule, can be used for the solution of this problem. Normally, a Linux system only has one routing table, in which only one default gateway can make entries. With iproute2, you have the ability to setup an additional routing table, for one thing, and allow this table to be used by the system based on rules, for another.

Read more

Share

2 Gateways or Multiple Gateway on a single CentOS box

Scenerio-

eth0- 172.30.0.100 | Gateway- 172.30.0.97

eth1- 192.168.2.247 | Gateway- 192.168.2.1

Need to connect to SIP BOX destination (fictitious)- 202.140.1.1

eth0 has not internet access but it uses the mentioned (172.30.0.97) as gateway to reach 202.140.1.1 server

eth0 has internet access by using 192.168.2.1 gateway.

Here goes the configuration on /etc/sysconfig/network-scripts/ifcfg-eth0

Read more

Share

Cacti on Debian (Updated)

Downloading Cacti

You can download the newest version of Cacti from its website.

wget http://www.cacti.net/downloads/cacti-0.8.7b.tar.gz

Installing Cacti

Install apache webserver with php support, mysql database server, snmp, some php modules and rrdtool.

apt-get install apache2 libapache2-mod-php5 php5 php5-cli php5-mysql php5-gd php5-snmp mysql-client mysql-server libmysqlclient15-dev snmp snmpd rrdtool

Add a user account for cacti.

Read more

Share