Project 14 for CNIT 122 - Squid Proxy (15 pts.)

What You Need

Purpose

We will create a non-transparent Web proxy, with content filtering and antivirus.

Starting the Linux Machine

Start your Linux machine and make sure it is connected to the Internet.

Installing ClamAV

ClamAV is the antivirus, which will stop Windows viruses from reaching our clients.

In a Terminal window, enter these commands, pressing Enter after each one:

apt-get install clamav-daemon clamav-freshclam -y

freshclam -v

The freshclam update process may take a while, if your Internet connection is slow.

You will see some warning messages, saying "This version of the ClamAV engine is outdated." For this project, just ignore them, but in a production environment it would be good to find out how to update the engine.

Installing Squid

Squid is the proxy itself.

In a Terminal window, enter this command, and then press Enter:

apt-get install squid -y

Configuring Squid

In a Terminal window, enter this command, and then press Enter:
nano /etc/squid/squid.conf
Press and hold the Ctrl+V keys until you get to the bottom of the file.

Add this line:

http_port 3128
Your configuration file should look like the example below:

Save the file with Ctrl+X, Y, Enter.

Now you need to restart Squid.

In a Terminal window, enter this command, And Then Press Enter:

/etc/init.d/squid restart

Testing Squid

In a Terminal window, enter this command, And Then Press Enter:
netstat -an | grep 3128
You should see a process in the LISTEN state on port tcp 3128, as shown below:

Installing DansGuardian

DansGuardian is the Web content filter.

In a Terminal Window, enter this command, and then press Enter:

apt-get install dansguardian -y

Configuring DansGuardian

In a Terminal window, enter this command, and then press Enter:
nano /etc/dansguardian/dansguardian.conf
You need to two changes in this file: 1. Add a # at the start of the fifth line which starts with the word UNCONFIGURED, as shown below:

2. Activate the antivirus. To do that, in nano, press Ctrl+W to start a search in the configuration file.

At the bottom of the screen, a white bar appears starting with Search:. Type contentscanner and press Enter.

Remove the # character from the first line beginning with "contentscanner", as shown below:

Save the file with Ctrl+X, Y, Enter.

Now you need to restart DansGurdian.

In a Terminal window, enter this command, and then press Enter:

/etc/init.d/dansguardian restart
You will see several more warnings that the antivirus is out of date, as shown below:

Testing the Proxy

In a Terminal window, enter this command, And Then Press Enter:
netstat -an | grep 8080
You should see a process in the LISTEN state on port tcp 8080, as shown below:

Using the Proxy Server

In the Linux machine, from the top left of the desktop, click Applications, Internet, "Firefox Web Browser".

In Firefox, click Edit, Preferences.

In the "Firefox Preferences" box, on the Network tab, click the Settings button.

Click the "Manual proxy configuration" button.

Enter a Port of 8080

Click the "Use this proxy server for all protocols" button, as shown below:

Click the OK button.

Click the Close button.

In Firefox, go to this URL:

http://samsclass.info/345/proj10/BadApp.exe

You should see a page titled "DansGuardian - Access Denied", telling you "Access has been Denied!", as shown below:

Saving the Screen Image

Make sure the Access denied message is visible, as shown above.

Save a screen capture with a filename of "Proj 14 from YOUR NAME".

Turning In Your Project

Email the image to cnit.122sam@gmail.com with a subject of "Project 14 from YOUR NAME".


Source

http://www.howtoforge.com/squid-proxy-server-on-ubuntu-9.04-server-with-dansguardian-clamav-and-wpad-proxy-auto-detection




Last modified 11-8-11 9 pm