Configure proxy servers with squid and Squidguard under Linux

Source: Internet
Author: User
Tags filter ftp backup linux

Objective:

This paper mainly introduces the use of Squid and Squidguard configuration Proxy server in Linux, with the WWW Proxy service as an example to explain how to filter harmful sites and restrict users ' access to the Internet.

I. INTRODUCTION

Squid is the most popular proxy server software under Linux, it is powerful, support for Http,ftp,gopher,ssl and WAIS, and other protocols agent; Simple to set, the proxy server can be run with a slight change in the configuration file. And squid has the page caching function, it receives the user's download request, and automatically processes the downloaded data. That is, when a user wants to download a homepage, it sends a request to squid to download it for it, then squid connects to the requested Web site and requests the home page, and then passes the home page to the user while retaining a backup, when another user applies for the same page, Squid passes the saved backup to the user immediately, making the user feel very fast.

Squidguard is the Assistant software for squid, which completes the function of filtering, redirection and access control. It is a free software, features strong, easy to install, easy to configure, and processing speed. Features include: Restricting access to some users based on a Web server or list of URLs, blocking access to Web servers and URLs on the blacklist, blocking access to URLs that are matched by certain users to regular expressions, and enforcing domain access in URL paths that prohibit IP access; Redirect blocked URLs to a smart CGI information page, redirect unauthorized users to a registration page, have access rules based on date, week, day, and different rules for different user groups. However, you cannot filter, check text in documents, and JavaScript or VBScript scripting languages in HTML.

Two. Installation

1. Install Squid:

Download from www.squid-cache.org squid-2.4.stable2-src.tar.gz exists under local/usr/local/squid/src.

Before compiling squid, create a user and group dedicated to running squid, where a group and user named Squid are set up and the user directory is set to/usr/local/squid

#su Squid

$CD/USR/LOCAL/SQUID/SRC

$tar Xvzf squid-2.4.stable2-src.tar.gz

$ CD Squid-2.4.stable2

$./configure

$make

$make Install

(Installed by default to the/usr/local/squid directory)

2. Install Berkeley DB 2.x:

From http://www.sleepycat.com download db-2.7.7.tar.gz coexist in/usr/local/squidguard/src/directory

$su

#cd/usr/local/squidguard/src/

#tar Xvzf db-2.7.7.tar.gz

#cd db-2.7.7

#cd Build_unix

#.. /dist/configure

#make

#make Install

(Installed by default to the/usr/local/berkeleydb directory)

Note: Squidguard does not support Berkeley DB 3.x version

3. Install Squidguard

From http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/squidGuard-1.1.4.tar.gz download packages coexist in local/usr/local/squidguard/src/

#cd/usr/local/squidguard/src/

#tar Xvzf squidguard-1.1.4.tar.gz

#cd squidGuard-1.1.4

#./configure--with-sg-config=/usr/local/squidguard/squidguard.conf

--with-sg-logdir=/usr/local/squidguard/logs

--with-sg-dbhome=/usr/local/squidguard/db

#make

#make Test//test OK for the next installation

#make Install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.