Sponsored Content
Full Discussion: Squid Advance problem.
Operating Systems Linux Debian Squid Advance problem. Post 302526976 by linuxjunkie on Thursday 2nd of June 2011 10:43:34 AM
Old 06-02-2011
Squid Advance problem.

Hi There

I have a network where im running squid proxy in transparent mode. All sites are blocked by default and the users can only browse sites listed in a file called allowed-sites. I have to block a group of users in department A from accessing 5 sites that the rest of the company can access.

I was going to use the ip addresses of the pc's that are used in dep A, but i was unable to get it to work.

Below is a part of my squid.conf file listing my acl config.
Can some one please help me on this.
Thanks in advance !
Code:
acl allowed-sites dstdomain "/etc/squid/acls/allowed-sites"
acl banned-files urlpath_regex "/etc/squid/acls/banned-files"
acl banned-words url_regex -i "/etc/squid/acls/banned-words"
acl banned-sites dstdomain "/etc/squid/acls/banned.sites"
acl full-access src "/etc/squid/acls/full-access"
#acl dep-a-ips src "/etc/squid/acls/dep-a-ips"
#acl dep-a-sites dstdomain "/etc/squid/acls/dep-a-sites"

acl morning time 8:00-9:00
acl lunch time 13:00-14:00
acl afternoon time 16:00-17:00
#http_access allow business_hours

http_access deny manager

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

acl localnet src 172.16.0.0/22
acl net1 src 172.17.1.0/24
acl net2 src 172.18.1.0/24
http_access allow localhost

http_access deny banned-words
http_access deny banned-files
http_access deny banned-sites !full-access
http_access allow full-access
http_access allow allowed-sites
http_access allow net1 morning lunch afternoon
#http_access allow dep-a-ips !dep-a-sites
http_access deny all

---------- Post updated at 04:43 PM ---------- Previous update was at 09:57 AM ----------

A friend of mine gave me the selution.

Code:
acl allowed-sites dstdomain "/etc/squid/acls/allowed-sites"
acl banned-files urlpath_regex "/etc/squid/acls/banned-files"
acl banned-words url_regex -i "/etc/squid/acls/banned-words"
acl banned-sites dstdomain "/etc/squid/acls/banned.sites"
acl full-access src "/etc/squid/acls/full-access"
acl dep-a-ips src "/etc/squid/acls/dep-a-ips"
acl dep-a-sites dstdomain "/etc/squid/acls/dep-a-sites"

acl morning time 8:00-9:00
acl lunch time 13:00-14:00
acl afternoon time 16:00-17:00
#http_access allow business_hours

http_access deny manager

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

acl localnet src 172.16.0.0/22
acl net1 src 172.17.1.0/24
acl net2 src 172.18.1.0/24
http_access allow localhost

http_access deny banned-words
http_access deny banned-files
http_access deny banned-sites !full-access
http_access deny dep-a-ips dep-a-sites
http_access allow full-access
http_access allow allowed-sites
http_access allow net1 morning lunch afternoon
http_access deny all

Smilie

Last edited by linuxjunkie; 06-02-2011 at 11:48 AM..
 

10 More Discussions You Might Find Interesting

1. Linux

Problem with SQUID

hi all... i installed Red Hat 9...but i can use a proxy server with service squid... in my job i have a direct internet connection in the linux, but i configurate squid.conf...ports...ip's.... but still not working...with the windows machines.... in the linux server if i put the 127.0.0.0 port... (1 Reply)
Discussion started by: chanfle
1 Replies

2. IP Networking

squid logs problem

hi i am having problem with proxy logs the log file in /var/log/squid/access.log is having 0 size i am using red hat linux enterprise edition squid version->Version 2.5.STABLE6 with default conf file and it is running but whatever i access from internet it is not... (1 Reply)
Discussion started by: madhusudankh
1 Replies

3. Linux

Squid Browsing problem

Configured Squid2.0 on linux9. Browsing is very slow in client side. takes atleast 1min to open the page. can anybody tell me what to do Thaks in Advance (0 Replies)
Discussion started by: teenasuresh
0 Replies

4. UNIX for Advanced & Expert Users

Regarding Advance installation

Hi to all, I have one doubt in unix/linux installation. There are two systems in which one is Sparc system having no CD-Rom, No O/S and fresh Hard disk and another system is having windows O/S. Now, can i install unix or linux o/s in the Empty Sparc System by using other system which is... (1 Reply)
Discussion started by: sasidarvarma
1 Replies

5. UNIX for Dummies Questions & Answers

Squid Configuration problem

I have squid version 2.6 running on ubuntu linux as a proxycache although caching is not being used, the problem I have is that certain websites that require the user to log into do not seem to pass through the squid, the only thing I see is that the website is trying to access a file called... (1 Reply)
Discussion started by: Simon Young
1 Replies

6. Linux

Red Hat linux(Advance server) problem

we are receiving following error in our application server & server not booted:- "INIT IP ID x ,Respawning too fast; disable for 5 minutes." Please give me solution for above mention problem as early as possible . AKM (3 Replies)
Discussion started by: akm9999
3 Replies

7. Red Hat

msn messenger problem with squid

Dear All I m running Linux Proxy Server on RHEL-5 64bit for providing http access to users in my office, i m facing a problem while using msn messenger on LAN, we access msn messenger through above mentioned proxy server, whenever I sign in to msn messenger, it gets signed on but after a short... (1 Reply)
Discussion started by: surfer24
1 Replies

8. Solaris

Advance 2 Days

Hi, Anyone can help me, how to used the advance 2 days? today is : 20090915 i need to get the date : 20090917 in the OS level Thanks, DBM (4 Replies)
Discussion started by: dba_macau
4 Replies

9. Linux

Squid Tproxy Bandwidth problem

I Configure Tproxy using squid 2.6 then the squid is fine I can see the website that my users are accessing when I connect my tproxy to my LAN users The internet become slow and I can ping the Google some above 3000 ms also end users cannot ping google and with out tproxy I can ping Google 150ms ... (3 Replies)
Discussion started by: fahadabdillahi
3 Replies

10. IP Networking

Squid vs iptables = no Squid access.log?

Hello, I have a pretty useless satellite link at home (far from any civilization), so I wanted to set up caching in order to speed things up. My Squid 2.6 runs "3128 transparent" and is set up quite well on a separate machine. I also have my dd-wrt router to move all port 80 traffic through... (0 Replies)
Discussion started by: theWojtek
0 Replies
A2ENSITE(8)                                                   System Manager's Manual                                                  A2ENSITE(8)

NAME
a2ensite, a2dissite - enable or disable an apache2 site / virtual host SYNOPSIS
a2ensite [ [-q|--quiet] site] a2dissite [ [-q|--quiet] site] DESCRIPTION
This manual page documents briefly the a2ensite and a2dissite commands. a2ensite is a script that enables the specified site (which contains a <VirtualHost> block) within the apache2 configuration. It does this by creating symlinks within /etc/apache2/sites-enabled. Likewise, a2dissite disables a site by removing those symlinks. It is not an error to enable a site which is already enabled, or to disable one which is already disabled. Apache treats the very first virtual host enabled specially as every request not matching any actual directive is being redirected there. Thus it should be called 000-default in order to sort before the remaining hosts to be loaded first. OPTIONS
-q, --quiet Don't show informative messages. -m, --maintmode Enables the maintainer mode, that is the program invocation is effectuated automatically by a maintainer script. This switch should not be used by end users. -p, --purge When disabling a module, purge all traces of the module in the internal state data base. EXIT STATUS
a2ensite and a2dissite exit with status 0 if all sites are processed successfully, 1 if errors occur, 2 if an invalid option was used. EXAMPLES
a2dissite 000-default Disables the default site. FILES
/etc/apache2/sites-available Directory with files giving information on available sites. /etc/apache2/sites-enabled Directory with links to the files in sites-available for enabled sites. SEE ALSO
apache2ctl(8). AUTHOR
This manual page was written by Stefan Fritsch <sf@debian.org> (based on the a2enmod manual page by Daniel Stone <daniel@sfarc.net>) for the Debian GNU/Linux distribution. 8 June 2007 A2ENSITE(8)
All times are GMT -4. The time now is 08:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy