Working SQUID.CONF 2.7 Example! [Ubuntu]


Syed Jahanzaib Personal Blog to Share Knowledge !

More update and high tunned squid.conf example can be found here.

http://aacable.wordpress.com/2012/01/19/youtube-caching-with-squid-2-7-using-storeurl-pl/

UPDATED: JULY , 2013]

Below is an example of good (aggressively) working squid.conf tested in Ubuntu v9.10 / 10.4]
I was doing some experiments on squid, it was just for lab testing but you can modify it according to your need. To get good performance from squid cache, make sure you put as much RAM as you can afford.
My recommendation is to use at least 8-16 GB of ram in the squid box.

I tested this configuration on the following hardware/OS:
XEON 3.6Ghz Dual / 8 GB RAM / 320 GB
Ubuntu Desktop 10.4

I got very good cache HITRATIO using this customized configuration. Following snapshot shows the hit ratio captured by customized MRTG graph.

Warning: Make sure that you understand each parameter’s function before applying / modifying.

Regard’s
Syed Jahanzaib
x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x

Note: The refresh pattern…

View original post 587 more words

MIKROTIK :Howto Redirect HTTP traffic to SQUID with Original Source Client IP


Syed Jahanzaib Personal Blog to Share Knowledge !

Howto connect SQUID box with Mikrotik and Log user’s original source ip in squid proxy log.

Consider the following Scenario.

In this scenario Mikrotik is acting as PPPoE Server. All internet traffic is passed from Mikrotik, except the HTTP PORT 80 data, which is marked and route to SQUID proxy server for caching facility and some other filtering task. We want to preserve source client IP address in squid logs, so that user web activity can be tracked via squid access log, sometimes it can be require by law enforcing agencies or can be required by administration / reporting / management purposes. So how to do it ?

I assume you already have working SQUID and Mikrotik (pppoe server with pppoe user ip pool 172.16.0.0/16 pool in place. however you can change it according to your scenario)

We will divide this article in two sections

1# MIKROTIK RouterOS…

View original post 465 more words

The Four Actions


– Taken from the book, The Four Actions by Hazrat Maulana Shah Hakeem Muhammad Akhtar Sahib (DB)

There are four actions which if one adopts, Insha Allah, he will become a wali before he passes away. With the barakah of practicing these four actions, Insha Allah, he will gain the ability to practice all the other commandments of deen. This is because generally people find these actions to be hard on the nafs. Like the student who manages to answer the difficult questions on a test will have no problem answering the easy ones. So, the one who suppresses his nafs for the pleasure of Allah and carries out these actions, practicing deen will become easy for him, and he will die as a wali of Allah.

1. Keeping a Beard to the Extent of One Fist in Length
2. Keeping the Ankles Exposed (This ruling applies to men. Women should cover their ankles)
3. Guarding the Gaze

4. Protecting the Heart and mind (thoughts)


The First Action: Keeping a Beard to the Extent of One Fist in Length

The following is reported in a hadith narrated by Imam Bukhari (RA):

“Oppose the Mushrikeen! Lengthen the beards and shorten the moustaches. When Hazrat Ibn Umar (RA) used to go for Hajj or ‘Umrah, he would take hold of his beard in his fist. Whatever amount of the beard was in excess of the fist, he would trim it.” (Bukhari vol. 2, pg. 875)

In another hadith the following words are used:

“Make the moustaches extremely short and lengthen the beards.” (Bukhari Vol. 2, pg. 875)

It is wajib to keep a beard to the extent of one fist just as it is wajib to perform witr salah, and the two ‘eid salats. All the four imams agree on this issue. Allamah Shaami writes:

“To trim the beard when it is shorter than one fist in length as practiced by some people of the west and the hermaphrodites, has not been permitted by anyone i.e. any scholar.”

Hazrat Thanwi (RA) writes in Behishti Zewar (Heavenly Ornaments), “It is haram to shave the beard as well as to trim it less than the length of one fist.” (Behishti Zewar section 11, pg. 115)

The word for beard in Arabic is lihyah which comes from the Arabic word for jaw. Therefore, the beard should be to the extent of one fist from the chin, the right side of the jaw, and the left side of the jaw, i.e. it should be the length of a fist from all three sides. Some people grow the beard to one fist from the chin but trim it to less than a fist from the sides. This is incorrect. If any one of the three sides of the beard has been shortened less than a fist, then this is a major sin.

The Second Action: Keeping the Ankles Exposed (This ruling applies to men. Women should cover their ankles.)

It is impermissible for males to cover their ankles with their pants, trousers, shalwars, thoubs or any other form of clothing (socks excluded). There is a hadith narrated by Imam Bukhari that states:

“Whatever portion of the ankles is covered by the lower garment will be in the fire.” (Bukhari Vol. 2 pg. 861)

It is clearly understood from this hadith that to cover the ankles is a major sin since the warning of punishment of the fire of jahannam is not given with regards to minor sins. In Bazl-ul-Majhood, the commentary of the Sunan of Imam Abu Dawood, Maulana Khaleel Ahmad Saharanpuri writes, “Izaar in the above hadith refers to any such garment that covers the ankles from above going downwards like pants, shalwars, kurtas, thoubs etc. To cover the ankles with such garments is forbidden. Izaar does not refer to anything that is worn from below such as socks or khuffs. Hence, there is no sin in covering the ankles with socks or shoes. So if someone really feels the urge to have their ankles covered, they should wear socks. The prohibition of covering the ankles with garments worn from above is applicable in two conditions: a) while standing, and b) while walking. Thus, while seated or reclining, if the ankles are covered by one’s izaar, then there is no harm. Some people dwell under the serious misconception that it is only necessary to expose the ankles in salah. So upon entering the masjid, they fold up their pants and expose their ankles for the duration of the salat. When they are leaving, they fold their pants back down. It should be noted that this rule is not restricted to salah but is for all times and all places. Allamah Khaleel Ahmad Saharanpuri (RA) also states:

“This command applies to males and not females.” (Bazl-ul-Majhood pg. 57)

Once a Sahabi (RA) said to Rasulullah (Sallallahu Alaihi Wa Sallam), “My shins have dried up.” What he meant was that because his shins, including his ankles, were skinny, and thin, they seemed a bit unsightly, and he wanted cover them up. However, Rasulullah (Sallallahu Alaihi Wa Sallam) did not permit him to do so. Instead he (Sallallahu Alaihi Wa Sallam) said, “Verily Allah does not love the one who covers the ankles.” (Fath-ul-Bari Vol. 10 pg. 264)

Dear friends, think for a moment! Is it wise to deprive yourself of the love of Allah simply for covering the ankles? On another occasion, Rasulullah (Sallallahu Alaihi Wa Sallam) said to another Sahabi (RA) who had his shawl dragging on the floor, “Is there not an example for you in my way of life?” (Fath-ul-Bari Vol. 10 pg. 263)

The question is actually an affectionate warning. Thus, the mere claim of love is not sufficient. Love, in reality, causes one to follow the beloved. As the poet says, “Verily the lover is obedient to the beloved.” The dictates of the love of Allah and His messenger (Sallallahu Alaihi Wa Sallam) demand that we do not disobey them. If we are obedient to them, then our claim to love them is true.

The Third Action: Guarding the Gaze

In this day and age there is a great negligence in this regard. Many people do not even regard the casting of evil lustful glances to be a sin whereas Allah has given the command of protecting the gaze in the Quran. Allah says, “Say (O Nabi (Sallallahu Alaihi Wa Sallam)) to the believers that they should lower their gazes.” This verse refers to looking at non-mahrams (a person with whom one is permitted to marry). Likewise, they should not gaze at beardless youth because they too resemble women. In fact, even if a youngster’s beard has grown to some extent but one still finds the heart somewhat inclined towards him, then to look at his also haram. Surely, it would be forbidden for an individual to view any such face that one finds attractive and derives pleasure from. To guard the gaze is such an important issue that Allah has separately commanded the women to also guard their gazes. Allah says, “And say to the believing women that they should lower their gazes” (Surah An-Noor)

This issue is unlike the command of salah, fasting, and other commandments where Allah has not given a separate commandment of the same issue to women. Rather the males have been addressed and the women have been included in those commandments because in Arabic, when a mixed gathering is addressed, the masculine form is used.

In a hadith narrated by Imam Bukhari (RA), Rasulullah (Sallallahu Alaihi Wa Sallam) has said, “a Lustful glance is the fornication/adultery of the eyes.” (Bukhari vol. 2 pg. 923)

The person who casts lustful glances and indulges in any form of fornication/adultery can never even dream of becoming a wali unless they sincerely repent from this evil.

In another hadith, Rasulullah (Sallallahu Alaihi Wa Sallam) is reported to have said, “May the curse of Allah be on the one who looks lustfully and on the one who is looked at with lust.” (Mishkaat, Book of Nikah, Chapter on looking at a woman for proposal)

In the above mentioned hadith, Rasulullah (Sallallahu Alaihi Wa Sallam) cursed both the person who casts lustful gazes and the one who is gazed at due to not adopting proper hijab etc. Those who fear curses of the saints and pious people should be more fearful of the curse of Rasulullah (Sallallahu Alaihi Wa Sallam). Therefore, if an accidental gaze falls on a beautiful face, shift the gaze immediately. Do not allow the gaze to remain focused on that face even for a single moment.

It is understood clearly from the verses of the Quran and from the hadith that the person who casts lustful glances has been given the following three evil titles:

1. Disobedient to Allah and Rasulullah (Sallallahu Alaihi Wa Sallam)

2. Fornicator/Adulterer of the eyes.

3. Cursed by Allah and Rasulullah (Sallallahu Alaihi Wa Sallam)

If a person is addressed with any of these titles, they would feel hurt and dishonored. So if a person wants to remain safe from these titles, it is necessary to guard the gaze.

Some foolish people object by saying, “What major wrong have we done? We did not take anything or do anything to anyone. All we did was look. These molvis scare us for nor reason.” O foolish person, it is not the molvis who are frightening you, it is Allah and Rasulullah (Sallallahu Alaihi Wa Sallam) prohibiting you and consequently cursing you. ‘Ulamaa do not make up matters of Deen, their job is merely to explain and expound the pre-established matters of Deen. The verses of the Quran and the hadith of Rasulullah (Sallallahu Alaihi Wa Sallam) mentioned above, are they the sayings of any molvi?

Beyond this, I say to such people who claim that they have not taken anything or done anything but look, is that if that is all you are doing then do not do it if it is so insignificant. Simply stop looking. It is quite clear and obvious that they are taking something and doing something when they are looking with lust. They are actually deriving haram pleasure which they are importing into their hearts. As a result, their hearts are being destroyed.

When a person casts lustful glances, they become distanced from Allah that to such a degree no other sin pushes them so far away. The qiblah of the heart completely changes from being directed towards Allah, is not being directed towards the one this person is glancing at. The heart of this person has now turned its back on Allah. Now, whether this person is performing salah, reciting Quran, or performing any other act of worship, that beautiful face is constantly on his mind. Instead of the zikr of Allah, the zikr of that person is in the heart. The heart is not subject to such destruction by means of any other sin as compared to how it is destroyed by lustful glances. For example, if a person has missed salah or lied, then his heart will be diverted by 45 degrees. However, when he repents and asks Allah for forgiveness, his heart will once again be directed towards Allah. On the contrary, the sin of casting lustful glances will make a person completely unmindful of Allah, and the love of the person he has gazed at settles in his heart. As a result, some people have even lost their Iman at the time of death.

Allah Ta’ala has declared in a hadeeth qudsi, “Verily the lustful glance is a poisonous arrow from the arrows of shaytan. Whoever leaves the casting of lustful glances out of My fear, I will give him in return such Iman, the sweetness of which he will taste and feel in his heart.” (Kanz-ul-’Ummaal Vol. 5 pg. 328)

In other words, he will physically acquire the sweetness of Iman in his heart. This in not a fantasy or part of someone’s imagination. We have not been instructed to imagine the sweetness of Iman, but rather the word “yajidu” that has been used in the hadith is indicative of a physical experience of the taste of the sweetness of Iman.

Dear friends! Implement this advice and see the effects for yourself. The heart will experience such sweetness of Iman that as a result, the value for the kingdom of the whole world will perish from one’s heart. Imam Qushairi writes in his Risalah that by the injunction of guarding the gaze, Allah has taken away the pleasure of the eyes, but in return He has granted the non-perishable sweetness of Imaan. Mullah Ali Al-Qari writes that it has been narrated that once the sweetness of Iman enters into the heart, it will never exit. This is an indication that the person will die with Iman. The reason for this is obvious since when Iman will leave the heart after entering it, death will also come upon Iman. In today’s time, this treasure of dying with Iman is being distributed in the shopping malls, at the airports and any other public place. Protect your gaze in these places and gather the sweetness of Iman. Thus, you will acquire the guarantee of death with Iman. Keeping this in mind, I say that if in these days there is an abundance of nudity, lewdness, and a lack of shame and modesty, then coupled with that there is also an abundance of opportunities to gather the sweetness of Iman. Guard your gaze and partake in the halwah of Iman. This is for both men and women

4. Protecting the Heart and mind (thoughts)

Along with guarding the gaze, protecting the heart is also necessary. Some people guard their gaze, but they do not protect their hearts. They do not cast lustful glances but they do not protect the heart from fantasizing about beautiful women or men. They derive haram pleasure by fantasizing or imagining. We should realize that this is also haram. Allah mentions, “He knows the treacheries of the eyes, and that which you conceal in your hearts.” (Surah Al-Mu’min) Allah knows of the haram pleasure that a person derives in their heart. If the sins of the past come to mind on their own, these in it of themselves are not wrong. It is wrong and sinful to bring these thoughts to mind on one’s own accord. If an evil thought comes to mind, one will not be held accountable for this. However, when an evil thought comes to mind, then to entertain that thought (by thinking further about it) is haram, or to deliberately think of previous sins and derive pleasure from it, or to plan to commit a sin in the future. These aspects will invite the displeasure of Allah. Another severe harm of thinking of these evil thoughts is that the desire to commit sins increases. The result of this is that a person might physically become involved in sin.

May Allah protect us and save us from all these haram acts. By the barakah of being protected from these sins, Insha Allah, it will become easy to abstain from all sins.

To gain taufeeq to practice on the above four actions, one should complete the following four tasbeehaat:

1.) In the state of wudhu, clean clothes, with perfume applied, faced towards the qiblah, meditate over the fact that your grave is before your eyes. Before everything else, negate your own self. Thereafter negate everything other than Allah and recite 100 times لا اله الا الله

When you say لا اله then you meditate that all the beloved things of this temporary world and all the false idols (which have taken shape in the form of carnal desires in my heart) are being negated.

Meditate that a pillar of light from the ‘Arsh of Allah Ta’ala is entering your heart when you say الا الله

2.) For Males: Make zikr of ismuz-zaat by saying الله the blessed name of Allah Ta`ala 100 times. Imagine that with your tongue, the heart is also saying the name of Allah. For Females: Make tasbeeh by saying Subhaanallah 100 times.

3.) Recitation of Istighfaar 100 times.

4.) Send prayers upon the beloved Messenger (Sallallahu alaihi wa Sallam) by reading 100 times

صلّي الله علي النبي الامّي

Reference : http://www.khanqah.org

iSCSI SAN/NAS SOLUTION FOR ESXi SERVER (Tutorial No 5)


Sorry! for late posting due to heavy work load. Today we are going to arrange a shared storage solution for our lab.  However it is good idea to use Linux appliances as a SAN/NAS solution.  Openfiler and FreeNAS are very popular free operating systems that provides file-based network-attached storage and block-based storage area network.

In vSphere infrastructure we need shared/SAN/NAS storage to perform advance vSphere functions like:

  • vMotion
  • svMotion
  • VMHA
  • FT
  • DRS
  • DPM

So, we are going to use Openfiler as iSCSI shared storage.  In this case we need a dedicated server/virtual machine.  First of all download the latest OpenFiler’s ISO/Virtual Appliance from

http://www.openfiler.com/community/download/

In my lab I have created a VM for installation of OpenFiler with following configurations:

RAM 512 GB

Hard Disk 1 : 20 GB (For OpenFiler OS)

Hard Disk2: 100 GB (Secondary disk for iSCSI Target  Purpose)

Installation of OpenFiler (Step 1)

Great! now we have completed first step of installation. Now its time to configure the Open Filer for our vSphere Lab Scenario.

Configuration of Open Filer (Step 2)

Main points of the configurations:

1. Configure the Static IP for Open Filer.

2. Configure the NTP.

3. Create partition and volume.

4. Create iSCSI file system.

5. Allow the network.

6. Enable & Start  iSCSI Target Service.

7. Add the IQN.

8. Map the LUN.

We have completed our configuration of Open Filer, main points of  adding the storage (iSCSI) to ESXi  Server are:

1. Add a software iSCSI adaptor.

2. Configure the new iSCSI adaptor to use dynamic discovery & enter the IP/Host name of the Open Filer Server.

3. Perform re-scan.

4.Add storage.

Good Idea for bulky transfers.


Syed Jahanzaib Personal Blog to Share Knowledge !

Yesterday I was trying to upload a 450GB VMDK file to ESXi host. (Actually it was VHD file and I converted it to VMDK using starwind converter), and it was uploading dead slow and showed countless hours to complete the upload.  After some googling I found that generally it takes too much time to Upload/Download any VM/ISO File FROM/TO ESXi host. I also tried VEEAM FASTSCP free tool but no avail. It still works very slow.

However if you add FTP service to your ESXi server, and use ftp client to upload/download files, then the upload/download will be much faster.  ProFTPD runs good in ESXi 5.x and offers high transfer rate over normal transfers.
As showed in the image below . . .

Upload to ESXi Host using VsphereClient

9.8Mb

Upload to ESXi Host using FTP Client [After adding FTP service in ESXi]

27mb

.
.

To add FTP Service, use…

View original post 203 more words