LinuxQuestions.org
Visit Jeremy's Blog.
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 09-16-2011, 03:41 AM   #1
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Rep: Reputation: 1
Blocking url in squid


Hi

i have centos5.3 installed with squid proxy i want to block the site https://accounts.google.com


Regards
Amar
 
Old 09-16-2011, 06:03 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You may try:
Code:
acl bad_url dstdomain accounts.google.com
...
http_access deny bad_url
 
Old 09-16-2011, 07:59 AM   #3
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
Thanks for reply guru

But i tried the above solution it is not work , i used acl name gmail instead of bad_url



AMar
 
Old 09-16-2011, 08:22 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
The acl name does not matter. What matters is the order of the deny and allow
You must put the deny directive before any accept directive, e.g.
Code:
acl google dstdomain accounts.google.com
...
http_access deny google
http_access allow localnet
 
Old 09-16-2011, 08:28 AM   #5
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
hi
I already kept deny directive before accept still the issue


Amar
 
Old 09-16-2011, 08:55 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Are you sure you're reloading squid after making the changes in squid.conf and you're using clean browser session?
If it still doesn't work check squid access_log and maybe post here the part of it, when you ask for the banned URL. Also post the acl part of squid.conf
 
Old 09-17-2011, 12:37 AM   #7
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
hi guru

I checked that if i put proxy ip address in browser then this site is not open, but if i remove proxy then his site is open , as i have Transparent proxy configured on squid server, hence i dont put proxy ip in user browser.
it this issue still there then any user can remove proxy ip and access the below said url
i think squid squid block http://accounts.google.com but not https://accounts.google.com i.e https how to solve this issue


AMAr
 
Old 09-17-2011, 03:58 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,
Quote:
I checked that if i put proxy ip address in browser then this site is not open, but if i remove proxy then his site is open , as i have Transparent proxy configured on squid server, hence i dont put proxy ip in user browser.
The acls work even in transparent proxy, so I think that currently your clients are not using squid at all.

Quote:
i think squid squid block http://accounts.google.com but not https://accounts.google.com i.e https how to solve this issue
The acl above is blocking the domain regardless of the protocol used.
 
Old 09-17-2011, 04:49 AM   #9
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
thanks for reply , can you tell me how to solve this problem
 
Old 09-17-2011, 11:30 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Have a look at this howto about squid transparent proxy configuration.
In addition to the above and if the acl doesn't work, because of the https, you can change it with to:
Code:
acl google dstdomain accounts.google.com
acl CONNECT method CONNECT
...
http_access deny CONNECT google
...
 
  


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
url blocking via iptables Mr.J Linux - Networking 11 12-05-2020 09:37 AM
Cannot Redirect URL to another URL when the link is down with Squid marx_long Linux - Newbie 1 06-13-2010 08:59 PM
Squid: Blocking HTTPS URL priyadarshan Linux - Security 1 08-26-2009 04:29 AM
Help:Squid blocking Internet URL littleheart Linux - Server 7 01-02-2009 06:50 AM
iptables - Blocking an URL ddaas Linux - Security 2 10-14-2004 06:36 PM

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

All times are GMT -5. The time now is 07:29 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