LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 11-25-2009, 12:32 AM   #1
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Rep: Reputation: Disabled
Plugin for squid to control https access?


Hello all,

I am using squid 2.6 stable on CentOS5.4 for proxy requirements. It is working in transparent mode. Can not remove it from transparent mode as it is difficult to go and configure every browser on every client for proxy settings. And it does a good job.
But one down side of using a transparent proxy is that it can not intercept https requests.
So even if I block some sites, they would be accessible through https. For example, I have gmail blocked but if it is visited through https explicitly, it would just pass through.

But I would like to hear from you members if someone knows any plugin or extension for squid that will add this functionality for controlling https access.

PS: I can not redirect 443 requests to 3128 or 80 port. This will block all the https requests. I do not want this as all the banks use https for online payments and all.
 
Old 11-25-2009, 02:26 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by linuxlover.chaitanya View Post
Hello all,

I am using squid 2.6 stable on CentOS5.4 for proxy requirements. It is working in transparent mode. Can not remove it from transparent mode as it is difficult to go and configure every browser on every client for proxy settings. And it does a good job.
But one down side of using a transparent proxy is that it can not intercept https requests.
So even if I block some sites, they would be accessible through https. For example, I have gmail blocked but if it is visited through https explicitly, it would just pass through.

But I would like to hear from you members if someone knows any plugin or extension for squid that will add this functionality for controlling https access.

PS: I can not redirect 443 requests to 3128 or 80 port. This will block all the https requests. I do not want this as all the banks use https for online payments and all.
have you tried squidguard?

Code:
http://www.squidguard.org/
 
Old 11-25-2009, 02:53 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Original Poster
Rep: Reputation: Disabled
I do have looked at squidguard but it does not mention it can do https controlling.
 
Old 11-25-2009, 03:20 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by linuxlover.chaitanya View Post
I do have looked at squidguard but it does not mention it can do https controlling.
ok, have a look at dansguardian then.
i know this def does this as i have used it some time ago

Code:
http://dansguardian.org/?page=introduction
 
Old 11-25-2009, 04:11 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Original Poster
Rep: Reputation: Disabled
Oh yes, I am actually using Dans in one of my sites. So it should be easier for me to change to Dans with little effort. Let me see if this works. The homepage says it is able to filter https URLs.
Quote:
# The URL filtering is able to filter https requests.
I hope this works for me. I will, though, have to change some of my iptables rules as well. Will have to remove DNAT and use masquerading.
 
Old 11-27-2009, 12:24 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Original Poster
Rep: Reputation: Disabled
Now that. Have used dansguardian and it is running fine in one my sites. But it is just not working here at my office. The rules for iptables are same at both the sites and still here it just does not.
I changed the rules to start the internet access and it did but squid now does not log the requests.
Do not know why. Have searched the google to find out that there are a lot of people who have this issue but none have the solution. I am trying to find it out.
I guess there is something to do with the rules that contain MASQUERADE and REDIRECT options. Earlier I was DNAT.

These are the two rules that I am using right now for the transparent proxying.

Code:
iptables -t nat -A PREROUTING -i $LAN_INTERFACE -p tcp --dport 80 -j REDIRECT --to-ports 8080

iptables -t nat -A POSTROUTING -o $INTERNET_INTERFACE -j MASQUERADE
I guess there is something to do with these rules that either there is no internet or squid just does not log the requests. I would squid and dans both to do the logging of requests.
 
Old 11-27-2009, 03:05 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Original Poster
Rep: Reputation: Disabled
Dansguardian is making me mad. The firewall rules for transparent proxy that are working for me at one server are not working at other one.
If I change the MASQ and redirection rules, they do work but the squid does not log the entries. I have tried all that I can think off. Now it is time for me to pull my hair.
 
Old 11-27-2009, 03:26 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Original Poster
Rep: Reputation: Disabled
Ok, I thought it would be easier for me to integrate Dans with my existing proxy setup for I have done this before successfully. But as fate is, it was not to be.
Either the squid logs the requests or dansguardian. So I guess when squid is doing the logging, dans is not working at all.
If I remove the second rule for MASQUERADING from my earlier post, squid will log the requests. I am guessing, dans stops working completely.
And if I keep both the rules, squid stops logging the requests. But it is working though.

I have a same rule set working at my other site, so I am hoping that firewall is not completely wrong.
 
Old 11-28-2009, 01:05 AM   #9
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Original Poster
Rep: Reputation: Disabled
I do not applied dansguardian rules yet but it is working and both squid and dans are logging the requests with client ip addresses as source.

Need to change this when dans sits between squid and client

Code:
forwardedfor=on ===> dansguardian.conf

follow_x_forwarded_for allow <acl> ==> squid.conf
This was what was required. Iptables rules were all fine.

Not marking it solved as yet as I do not know if dansguardian blocks https requests. When I confirm that will mark it as solved.
Thanks to centosboy for helping.

Last edited by linuxlover.chaitanya; 11-28-2009 at 01:06 AM.
 
Old 11-29-2009, 11:13 PM   #10
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Original Poster
Rep: Reputation: Disabled
Dans is not blocking the https requests. It is blocking www.gmail.com but not https://www.gmail.com
 
Old 12-01-2009, 12:55 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Original Poster
Rep: Reputation: Disabled
Something I was looking for is not possible.
Here:

http://www.linuxquestions.org/questi...pages.-772406/
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Day Specific Access control for Squid Bobbychat Linux - Networking 2 04-04-2011 10:58 AM
Access control with IP and MAC addresses (Squid) rhce_naresh Linux - Security 3 08-18-2009 02:13 AM
access control lists in squid.conf zebias Linux - Newbie 3 11-08-2007 11:45 AM
Squid Access Control acompw Linux - Software 2 09-02-2004 07:42 PM
Squid Access Control aaronsols Linux - Networking 1 09-30-2002 05:36 PM


All times are GMT -5. The time now is 01:25 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration