Control Web Access With Squid: Difference between revisions

From ITCwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 38: Line 38:
''root@ubuntu:~# '''chkconfig squid on'''''
''root@ubuntu:~# '''chkconfig squid on'''''
----




Line 43: Line 45:
''root@ubuntu:~# '''service squid start'''''
''root@ubuntu:~# '''service squid start'''''
''root@ubuntu:~# '''service squid stop'''''
''root@ubuntu:~# '''service squid stop'''''
''root@ubuntu:~# '''service squid restart'''''
''root@ubuntu:~# '''service squid restart'''''


[[File:3.PNG]]
[[File:3.PNG]]
----
You can test to verify if the Squid process is running with the pgrep command. (To get more info about pgrep, use the man command)
''root@ubuntu:~# '''pgrep squid'''''
If it is working you should be getting a response in plain old process ID numbers (see screen shot).
[[File:4.PNG]]

Revision as of 02:11, 8 May 2010

HOW TO CONTROL WEB ACCESS WITH SQUID

We are going to learn how to install and configure Squid on Ubuntu to restrict or allow web access on a network.


I. What is Squid?

Squid is a software that was developed by Duane Wessels as the Harvest object cache, part of the Harvest project at the University of Colorado at Boulder. The software was designed to run on Unix-like system, but it can also run on Windows-based system. Squid is a proxy server and web cache daemon. It can be used to speed up a web server by caching repeated requests and aiding security by filtering traffic (Control when and which IP adresses can access the web). It is primarily used for HTTP and FTP but has limited support for TLS, SSL, Internet Gopher and HTTPS.

II. Install Squid on Ubuntu.

What can be done before installing Squid is to search for the software on your machine. To do so, log in as root, and enter the following commands:

root@ubuntu:~# aptitude search squid


If the command was successful, you should have a similar screen shot.

1.PNG




If not already installed, we can being installation by entering the following commands:

root@ubuntu:~# aptitude install squid


The next screen shot assures us that Squid was installed successfully

2.PNG


III. Starting Squid

The chkconfig squid on command can be used to configure squid to start at boot.

root@ubuntu:~# chkconfig squid on



The service command squid start/stop/restart can be used after booting

root@ubuntu:~# service squid start

root@ubuntu:~# service squid stop

root@ubuntu:~# service squid restart

3.PNG


You can test to verify if the Squid process is running with the pgrep command. (To get more info about pgrep, use the man command)

root@ubuntu:~# pgrep squid

If it is working you should be getting a response in plain old process ID numbers (see screen shot).

4.PNG