CentOS: How to Configure Proxy Server

Introduction

A proxy server acts as a gateway between you and the internet. It is an intermediary server separating end users from the websites they browse.

First, we must install SQUID SERVICE

  • Because We cannot configure the Packages without squid services.

For Proxy Packages

  • We can Use Packages like — e2 guardian or dans guardian.
  • e2 guardian only in Debian Version (UBUNTU) not in RPM.

E2 GUARDIAN and DANSGUARDIAN USED FOR WEB CONTENT FILTERING

  • Filtering based on filetypes, download bandwidth, search patterns and much more.

SQUID SERVICES USED FOR WEB PAGE FILTERING

  • Using ACL, we can restrict and allow based on source, dst, domain and much more.

MYSAR / SARG USED FOR REPORT SERVICES

  • IP based and USER based.

To Verify

Debian Base OS Centos

— — — — — — — — — — — — — — — –

apt-cache search squid rpm -qi squid

Configuring On

Ubuntu Version 20.10 in Virtual Machine Workstation 16 Pro.

Network Bridged from Host pc to Ubuntu VM.

Installing Squid Service in Ubuntu Machine

Start / Enable and Check the status of Squid Service.

Install Firewall .

Assign the squid service port number to firewall.

Before Configuring the squid service, get a backup of the config file.

IP address verifying in ubuntu.

Manually Assigning Proxy Server to Firefox.

Configuring the SQUID SERVICES.

Creating URL files.

Vim blocklist_urls.txt

vim whitelist_urls.txt.

Restart the services And Check the status.

DENIED SITE

ALLOWED SITE

E2 GUARDIAN

E2 Guardian is the advanced version of Dans Guardian for web content filtering.

Filtering group

  • A filtering group is a way to identify one or more users who will share some settings, for example what’s banned and what’s allowed.

Filtering lists

  • When you install E2G you will find a directory called lists containing various lists to help you define what’s allowed and what’s blocked.
  • ban lists, to completely ban something
  • exception list, to trust something so that it’s always allowed
  • a grey list, something in between a ban and exception (white) list, which trusts a site but still subjects it to content checking
  • phrase lists, that help you allow or ban pages based on the content (words) appearing on the page

For ban, exception and grey lists, there are 4 ways you can express them:

  • a straight site ban, ie example.com , which would ban example.com and any subdomain
  • a regular expression, ie *.css, which would allow all the css files
  • a url, to allow or ban a page, while the rest of the domain can be allowed/banned.
  • a mime type, especially useful for files

Words/Phrase list

  • if you were to visit a page containing the words “cussing”, “leaning linux” and “badness” its total score would be +100–100+100=100. If your naughtiness level is 50, ie less than the total, the page will be blocked, otherwise it will be allowed.

E2G configuration

  • The main configuration file for e2g is called e2guardian.conf. If you are running a simple filter with just one group on standard ports, there isn’t actually anything to change in this file.

Checking for E2Guardian

Installing E2Guardian

Start / Enable and Check the status of E2Guardian Service.

Backed up the config file

FORWARDING all the conn from 8080 to access 3128.

If both services are configured in same server, the proxy ip would be localhost ifnot you have to define the ip of squid service. Both connection works through socket .

ASSIGN PORT TO FIREWALL.

THE FILTERING LIST

BANNED SITE LIST

BANNED PHRASE LIST

RESTART THE SERVICE

DEFAULT TEMPLATE WHEN BLOCKING SITE

MODIFIED TEMPLATE FOR BLOCKED SITES

BANNED IP LIST.

WINDOWS MACHINE.

BLOCKED NETFLIX SITE IN WINDOWS MACHINE.

  • E2 GUARDIAN BLOCKED SITE
  • SQUID SERVICE BLOCKED SITE
Leave a Reply
You May Also Like