1830899 Members
2741 Online
110017 Solutions
New Discussion

Re: Squid newbie

 
Shobhit_1
New Member

Squid newbie

hey all
i m new to squid....i m trying to implement it on my red hat 9....just to check its features...actually my sole purpose is url blocking...i first want to test it on my system...then will apply on the server.but i m quite new to such stuff with not much clear knowledge about proxy stuff.can ne one help me in configuring it.i want it quite simple....i thing i have already installed it.my confo file is attached along with.can ne one plz help me with that.
thanx in advance
Shobhit
7 REPLIES 7
Vitaly Karasik_1
Honored Contributor

Re: Squid newbie

Raj D.
Honored Contributor

Re: Squid newbie

Hi Shobhit ,

Here is the steps , may help you,

1. Configuration file is:

/etc/squid/squid.conf

Squid uses the configuration file squid.conf. It is usually located in the /etc/squid directory. Access through the proxy can be given by individual IP addresses or by a subnet of IP addresses.
In squid.conf search for the default access control lists(acl) and add the following line below them:

acl mynetwork src 192.168.1.0/255.255.255.0 (for subnet)
acl mynetwork src 192.168.1.10/255.255.255.0 (for individual IP)

Then add the access control list named "mynetwork" to the http_access list with the following line:
http_access allow mynetwork

The default port for the proxy is 3128. Uncomment the following line and replace 3128 with the desired port :

http_port 3128
---------------------------------------------------------------------------------------

2. To start and stop and restart Squid as follows.:

Assuming you have the runlevel scripts installed you can use the following commands as root:


Start squid /etc/rc.d/init.d/squid start
Restart squid /etc/rc.d/init.d/squid restart
Stop squid /etc/rc.d/init.d/squid stop


or issue the following TWO commands as root:
squid -z
squid

or you can configure squid to start at boot time using your runlevels.

---------------------------------------------------------------------------------------

3. To configure squid client:
To configure any application including a web browser to use squid, modify the proxy setting with the IP address of the squid server and the port number (default port 3128).

----------------------------------------------------------------------------------------
Also check the attached doc , may help ,

Cheers ,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
Shobhit_1
New Member

Re: Squid newbie

Thanx Raj...thanx all....well i will try dooing that tommorow.....thanx for the help......will revert back to u tommrow....thanx again..
Shobhit
Shobhit_1
New Member

Re: Squid newbie

Hey all...thanx for ur help....but still i m not able to acutually run squid.....raj i followed ur way but i dont know where is the prob as such....i installed it
opened the squid conf file on vi.....made some changes u told as such but it is not working......actally i made many changes from yesterday in the conf file seeing various tutorials...now if i want to start back from the scrap...then it is difficult.....Raj...i really need ur help...right now i m just trying to implement squid to block certain sites on my system...i dont want nething else right now....after editing the confo file....itry using squid start command as u mentioned...but it says command not found..can u plz help in a bit elobrate fashion plz.....thanx and waiting for ur response...i even tried ur attached document....dooing that i messed up with it fully...thanx in advance....
Shobhit
Ivan Ferreira
Honored Contributor

Re: Squid newbie

For a good quickstart, read the Linux Home Server HOWTO:

http://www.brennan.id.au/
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Shobhit_1
New Member

Re: Squid newbie

thanx ivan i just check it out
Raj D.
Honored Contributor

Re: Squid newbie

Hi Shobhit ,

You can run the # squid start , command from absolute path , ie /etc/rc.d/init.d

If still not able to find it , do a find, the script must be there to start the squid server.

# find / -name squid -print

hope this will help to locate the error,

Raj.
----
" If u think u can , If u think u cannot , - You are always Right . "