LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-22-2011, 03:09 AM   #1
salimshahzad
Member
 
Registered: Dec 2009
Posts: 200

Rep: Reputation: 15
squid transparent proxy restriction


hello gurus

i m using centos 5.6 x86

give us guideline if possible, we have squid transparent proxy, the ip is set 10.0.1.85, this is as gateway we enter in window client pc to browse. now we want to block some website so we try below two method does not work, can you check if anything wrong in this, we enter this all starting of file squid.conf

# Add this to the bottom of the ACL section of squid.conf
acl lan src 10.0.1.0/24



# Add this at the top of the http_access section of squid.conf
http_access allow lan
acl badsites dstdomain "/etc/squid/restricted-sites.squid"
http_access deny badsites

max_filedesc 4096

kind regards
hacit
 
Old 06-22-2011, 05:23 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

Since the acls are read from top to bottom, you should put the allow acl last:
Code:
acl badsites dstdomain "/etc/squid/restricted-sites.squid"
http_access deny badsites
http_access allow lan
Regards
 
Old 06-22-2011, 05:52 AM   #3
salimshahzad
Member
 
Registered: Dec 2009
Posts: 200

Original Poster
Rep: Reputation: 15
let me update you

when i stop proxy squid browsing stop, now i comment all lines that added so it also stop this means the file and squid.conf configuration working fine

can you advise is firewal should be start or stop, 2nd advise what r all alertnate method to block website, is there any order sequence first last allow deny etc ACL list is properly set see this in proxy with comment line

ERROR
The requested URL could not be retrieved

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

While trying to retrieve the URL: http://www.google.com/

The following error was encountered:

•Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.

Your cache administrator is root.



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

Generated Wed, 22 Jun 2011 09:52:30 GMT by proxyjed1.tmsa.com (squid/2.6.STABLE21)
 
Old 06-22-2011, 06:43 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

Quote:
when i stop proxy squid browsing stop, now i comment all lines that added so it also stop this means the file and squid.conf configuration working fine
This is what a transparent proxy is supposed to do. All traffic to port 80 is going through it, so if it's stopped you cannot browse anything.

Quote:
can you advise is firewal should be start or stop,
You need a firewall (iptables) to redirect all traffic to port 80 to the squid server.

Quote:
2nd advise what r all alertnate method to block website, is there any order sequence first last allow deny etc ACL list is properly set see this in proxy with comment line
I suggest you to read this about acls and how they apply.

Regards
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restriction of website through squid proxy server problem 124vikas.dange@gmail.com Linux - Server 1 09-25-2009 12:47 PM
download restriction over internet access using squid (proxy server) pankajkarde Linux - Server 4 03-21-2007 02:04 AM
restriction using squid(proxy) pankajkarde Linux - Server 1 03-17-2007 05:14 PM
Squid as a transparent proxy kemplej Linux - Software 2 12-08-2004 06:00 PM
squid transparent proxy...... hitesh_linux Linux - Networking 1 06-13-2003 04:24 AM


All times are GMT -5. The time now is 02:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration