Re: [squid-users] noob squid helpț

From: Tek Bahadur Limbu <teklimbu@dont-contact.us>
Date: Fri, 14 Sep 2007 01:11:07 +0545

Hi,

staff@entertaim.com wrote:
> I installed squid under yum, and I need help on managing it.
> Its great if one of you can talk to me one on one basis and teach/help me
> out..
>
> I need to:
>
> 1)Learn how to run squid

Is your OS Fedora? Which version of Squid did you install with Yum?

Try:

whereis squid
locate squid

Then to find the version:

squid -v

Find out where your squid.conf resides. It's usually in /etc/squid/ or
/usr/local/etc/squid/ or /usr/local/squid/etc/

> 2)Set it to only a certain IP address could use it as a proxy

Rename the default copy of your squid.conf.

Create a new squid.conf and add the following:

########### Start of squid.conf ##############

http_port 3128

cache_effective_user squid
cache_effective_group squid

cache_dir ufs /var/spool/squid 200 16 256

cache_access_log /var/spool/squid/access.log
cache_log /var/spool/squid/cache.log
cache_store_log none

emulate_httpd_log on

cache_mem 16 MB

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

hosts_file /etc/hosts

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 40% 4320

acl all src 0.0.0.0/0.0.0.0
acl mynetwork src 192.168.0.0/24
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl purge method PURGE
acl CONNECT method CONNECT

acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl SSL_ports port 443 563

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow localhost
http_access allow mynetwork
http_access deny all
http_reply_access allow all
icp_access allow all

visible_hostname myproxy.hostname.com

coredump_dir /var/spool/squid

######## End of squid.conf ##########

Then initialize your cache directories by running:

squid -z

Then run Squid in debug mode and make sure there are no errors using the
following command:

squid -NCd1

If all goes well, try putting this proxy server in your web browser
proxy settings and check if it works.

Remember to check and read the output of the following 2 commands:

squid --help
man squid

> 3)Know any other useful things I can set it so that it'll be safe.

There are tons of useful things which Squid can do. It's not possible to
mention them all in just 1 email! Just to mention a few, you can use
Squid to filter websites, viruses, malwares, improve browsing
performance, bandwidth savings, parental control, etc, etc, etc.....

Configuring a Squid proxy server is a continuous and enduring process.
You need to monitor, tune and upgrade it on a frequent basis. But then,
that's where the fun begins:)

The best advice that I can give you is to sort out your priorities for
which you want to use Squid for. Then search over the Internet regarding
Squid's capabilities.

For a beginners guide, you can start by reading the following topics:

(1.) http://www.squid-cache.org/Doc/

(2.) http://www.deckle.co.za/squid-users-guide/Main_Page

(3.) http://www.linux.com/articles/114084

(4.) http://linux.cudeso.be/linuxdoc/squid.php#Introduction

(5.) http://www.unixcities.com/squid/index.html

>
> I know this is asking for a lot, and another bad point is that I'm noob at
> unix/linux also.
> But if you just happen to have a spare time and would like to teach
> someone, Please get back to me.

No problem. Nobody was born with inbuilt Unix/Linux knowledge. Just read
all the stuffs you can find about Unix/Linux/Squid on the Internet. As
always, google is your friend.:)

>
> Your help is VERY appriciated.

Hope that helps.

Thanking you...

>
>
>
>

-- 
With best regards and good wishes,
Yours sincerely,
Tek Bahadur Limbu
System Administrator
(TAG/TDG Group)
Jwl Systems Department
Worldlink Communications Pvt. Ltd.
Jawalakhel, Nepal
http://www.wlink.com.np
Received on Thu Sep 13 2007 - 13:26:47 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Oct 01 2007 - 12:00:02 MDT