XTREME-SOURCE
Search:

Go Back   XTREME-SOURCE > TUTORIALS > TUTORIAL ARCHIVE > TUTORIALS: LINUX
Shoutbox
Loading...


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 11-27-2007, 07:54 PM
Junior Member
 
Join Date: Nov 2007
Posts: 11
How to setup squid proxy server on Linux Ubuntu

This tutorial covers how to run a proxy server using squid on Linux Ubuntu. I assume that you already have a running Ubuntu PC.

Hardware requirements:
Processor with clock speed of 100Mhz or above (AMD or INTEL).
Ram with size of 256mb or higher (The higher the better).
Hard Drive must be 40GB 7200rpm (Optional : Extra Hard Drive for caching).
Network Interface Card10/100 (2 Pieces... I prefer 3COM).

Okay lets assume that eth0 is the one connected to the internet (192.168.0.1).
And eth1 is the one that will distribute the internet connection to your local network (10.0.0.1).

Step1: Updating the system
Let's update first our Ubuntu box. Open a terminal console and key-in

Code:
$sudo apt-get update && sudo apt-get upgrade
Step2: Setting the gateway
Click System ---> Administration ---> Networking. A window will appear. On the connection tab choose eth1 interface and click on properties.
Change the gateway to 192.168.0.1. Then click close.

step3: Installing Squid
On the terminal console key-in the command

Code:
$sudo apt-get install squid
Step4: Back-Up the config file.
The squid main configuration file resides in /etc/squid directory (/etc/squid/squid.conf).
In the terminal console key-in the following to back-up your squid config file.

Code:
$sudo cp /etc/squid/squid.conf /etc/squid/squid.conf_bak
Step5: Squid Configuration
I will show to you how easy to configure squid as a proxyserver. First open the config file.

Code:
$gksu gedit /etc/squid/squid.conf
Inside the config file change the following settings with this:
http_port 10.0.0.1 3128 (Port 3128 is the default port you change it to 8080 if you want)
visible_hostname "yourhostnamehere" (Put the hostname of your server without quotes)
http_access allow all (The default is deny all)

Voila your done configuring your proxy server. All we need is to restart our proxy server and here is the command.

Code:
$sudo /etc/init.d/squid restart
You can set a rule(s) or restriction(s) on your proxy server using ACL. ViSolve - Squid Configuration Manual
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


vBulletin 3.7.1 ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0