LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 02: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, 04:23 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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, 04: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, 05:43 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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



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 11:47 AM
download restriction over internet access using squid (proxy server) pankajkarde Linux - Server 4 03-21-2007 01:04 AM
restriction using squid(proxy) pankajkarde Linux - Server 1 03-17-2007 04:14 PM
Squid as a transparent proxy kemplej Linux - Software 2 12-08-2004 05:00 PM
squid transparent proxy...... hitesh_linux Linux - Networking 1 06-13-2003 03:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:41 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
Open Source Consulting | Domain Registration