Archive for the ‘Uncategorized’ Category


parental-controls1

 

Advertisements

SquidGuard Configure

Posted: September 26, 2016 in Uncategorized

The best and easy way to install squidGuard is via YUM repo .Here how to do it .

1.With Squid working you can now go about installing SquidGuard.

You will need to install additional repositories in CentOS, in order to access to necessary software packages that are not available in the default repositories. Install the Extra Packages for Enterprise Linux (EPEL), the epel-release for the current version of Enterprise Linux (EL6). You can find it at the following website: http://fedoraproject.org/wiki/EPEL. A direct link to the RPM is in the command below. Eventually the link will be outdated and need to be replaced. For 64 bit systems you can change /i386/ to /x86_64/ in the command below.
# yum install http://ftp.osuosl.org/pub/fedora-epel/6/i386/epel-release-6-8.noarch.rpm

=========================================================================

[root@aueq-sproxy02 ~]# yum install http://ftp.osuosl.org/pub/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Examining /var/tmp/yum-root-8mVrB3/epel-release-6-8.noarch.rpm: epel-release-6-8.noarch
Marking /var/tmp/yum-root-8mVrB3/epel-release-6-8.noarch.rpm to be installed
Resolving Dependencies
–> Running transaction check
—> Package epel-release.noarch 0:6-8 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================
Installing:
epel-release noarch 6-8 /epel-release-6-8.noarch 22 k

Transaction Summary
===============================================================================================================================================================================================================
Install 1 Package(s)

Total size: 22 k
Installed size: 22 k
Is this ok [y/N]:

 

==========================================================================

Now install SquidGuard.

# yum install squidGuard

 

[root@aueq-sproxy02 ~]# yum install squidGuard
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
epel/metalink | 2.8 kB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:00
Resolving Dependencies
–> Running transaction check
—> Package squidGuard.x86_64 0:1.4-10.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================
Installing:
squidGuard x86_64 1.4-10.el6 epel 7.1 M

Transaction Summary
===============================================================================================================================================================================================================
Install 1 Package(s)

Total download size: 7.1 M
Installed size: 7.4 M
Is this ok [y/N]:

 

2. cd /var/squidGuard/

tar -zxvf blacklists.tar.gz

mkdir db

mkdir log

chown -R squid:squid db
chown -R squid:squid log

mv blacklists/* db/

chown -R squid:squid db/*

3. Now edit the squidGuard.conf file to configure it to work with the testdomains file. You may want to back up the squidGuard.conf file before making changes.

 

[root@aueq-sproxy02 db]# cp /etc/squid/squidGuard.conf /etc/squid/squidGuard.conf.BAK

 

# vi /etc/squid/squidGuard.conf —> and change as following.

 

=============================================================

# Mohammad Alam 23/09/2016
# initial conf file for squidGuard

logdir /var/squidGuard/log
dbhome /var/squidGuard/db

dest whitelist {
domainlist whitelist/domains
urllist whitelist/urls
}

dest specBlacklist {
domainlist specBlacklist/domains
urllist specBlacklist/urls
}

dest ads {
domainlist ads/domains
urllist ads/urls
}

dest adult {
domainlist adult/domains
urllist adult/urls
}

dest aggressive {
domainlist aggressive/domains
urllist aggressive/urls
}

acl {
default {
pass whitelist !specBlacklist !ads !adult !aggressive !audio-video !drugs !porn !chat !warez !phishing !malware !in-addr all
redirect http://10.80.0.37/ERR_ACCESS_DENIED.html
}
}

 

==================================================================

 

4. Add this line to /etc/squid/squid.conf

url_rewrite_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf

5. Reload squidGuard db

squidGuard -b -d -C all

6. Restart Squid.

/etc/init.d/squid reload

7. Check the log file at /var/squidGuard/log

[root@aueq-sproxy02 log]# ls
squidGuard.log
[root@aueq-sproxy02 log]# tail -f squidGuard.log
2016-09-26 11:11:51 [2388] squidGuard 1.4 started (1474852311.153)
2016-09-26 11:11:51 [2388] squidGuard ready for requests (1474852311.167)
2016-09-26 11:11:51 [2389] squidGuard 1.4 started (1474852311.160)
2016-09-26 11:11:51 [2389] squidGuard ready for requests (1474852311.171)

 

 

 

 

 

 

 

 

 

 

Squirelmail Inbox error

Posted: February 24, 2016 in Redhat, Uncategorized

Problem:

After signing in , I was getting the following error for one of the inbox ..

ERROR: Could not complete request.
Query: SELECT “INBOX”
Reason Given: Internal error occured. Refer to server log for more information. [2016-02-21 13:25:45]

 

Solution :

  • Was checking the /var/log/maillog and got the following information –>  [Feb 24 16:05:18 griffin imap(appts.XXX): File isn’t in mbox format: /var/mail/appts.XXX]
  • Then open the file with any text editor like vi /var/mail/appts.XXX
    then Delete the garbage lines(one or two) at the beginning and save the file.

    Restart the service and everything shloud be OK now.