LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-14-2013, 07:36 AM   #1
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Rep: Reputation: Disabled
content filter and then bypass https with Squid3


Hi

I was wondering if it is possible to perform the following with https request:

1) using squid, perform content filtering using squidguard (meaning allow or block the website)

2) If it is allowed, bypass squid and let the https connection move along without interfere


The reason i want to do this is becase i would like to bypass the https traffic from squid in order to avoid the fuzz of proxying https but at the same time not lose the content filtering

Thanks
 
Old 10-14-2013, 07:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
how can you possibly filter content with a service you are not using?!?!
 
Old 10-14-2013, 08:01 AM   #3
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
how can you possibly filter content with a service you are not using?!?!
Hello again acid_kewpie

As you can tell i am still messing around with squid and https ... well i was just trying to see if there is any "patent" that can be done.

For instance if squid could perform content filtering..some sort of firewalling a requested URL and if not in blacklist let it pass through...but as far as i understood by your replay my thought is not even logical ... rolf...
 
Old 10-14-2013, 08:39 AM   #4
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
how can you possibly filter content with a service you are not using?!?!
One last question

A friend of mine told me, which could be just silly rumors, that PFsense could successfully block any http/https traffic as well as handling properly https connections. Meaning that the user could type..for example, facebook.com and could access the site normally, and if you added facebook as black list it would then block it.

Are you aware of such function?

thanks
 
Old 10-14-2013, 08:51 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
handling properly? what does that mean? PFsense uses squid for web proxying, so there's no special feature in that distro.

What you seem to be defining there is just straight forward ACL config.

Last edited by acid_kewpie; 10-14-2013 at 08:57 AM.
 
Old 10-14-2013, 09:02 AM   #6
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
handling properly? what does that mean? PFsense uses squid for web proxying, so there's no special feature in that distro.
What i mean "properly" is that it does the job i am trying to achieve but i just confirmed that it is a myth! As i found out by the below post

http://forum.pfsense.org/index.php?topic=62256.0


the pfsense box should act as a certificate authority
 
Old 10-18-2013, 09:43 AM   #7
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
handling properly? what does that mean? PFsense uses squid for web proxying, so there's no special feature in that distro.

What you seem to be defining there is just straight forward ACL config.
I "partially" found my problem & solution"

Squid3 can handle https by creating tunnels with the CONNECT method. When i opened the SSL port on my firewall and added the below (which in most cases is a default) it all worked flawlessly (it also blocks https sites from squidguard imports) !

Code:
acl SSL_ports port 443
acl CONNECT method CONNECT
http_access allow CONNECT SSL_ports
The reason https CONNECT method was not working was/is because squid3 is "chained" with ziproxy. Squid3 forwards requests to ziproxy so i can have both content filtering and compression hence my new challenge now is how to make this CONNECT method of squid3 to worke wth ziproxy!

Thanks for the assistance
 
Old 10-23-2013, 06:30 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you can't. Read up (as I've previously urged you to) about what the CONNECT method is. It permits an encrypted tunnel between the browser and the end server meaning you can not filter the content.

Last edited by acid_kewpie; 10-23-2013 at 06:44 AM.
 
Old 10-24-2013, 03:13 AM   #9
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
you can't. Read up (as I've previously urged you to) about what the CONNECT method is. It permits an encrypted tunnel between the browser and the end server meaning you can not filter the content.
Hi acid

i think i am using the wrong terminology since the biggining of the thread.
When i said content filtering i ment the service of squidguard, meaning the service where you filter which URLs should pass from the proxy.

I guess this is not content filtering.. :-S
 
Old 10-24-2013, 03:17 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
the HOST is all that comes through a CONNECT method. You can filter the site as a whole, but you can't filter the PATH section of the URI, only the HOST.
 
Old 10-28-2013, 09:16 AM   #11
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
the HOST is all that comes through a CONNECT method. You can filter the site as a whole, but you can't filter the PATH section of the URI, only the HOST.
Chris

the way my setup is now, i have:

|client (transparent)|------>|squid|------->|ziproxy|-----(internet/web)

(squid is "chained" to ziproxy)

do you know if it is possible to configure squid to use chain/request from ziproxy only for non-ssl pages (HTTP) and use CONNECT method without using ziproxy for HTTPS pages?

Thanks
 
Old 10-28-2013, 10:18 AM   #12
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tripialos View Post
Chris

the way my setup is now, i have:

|client (transparent)|------>|squid|------->|ziproxy|-----(internet/web)

(squid is "chained" to ziproxy)

do you know if it is possible to configure squid to use chain/request from ziproxy only for non-ssl pages (HTTP) and use CONNECT method without using ziproxy for HTTPS pages?

Thanks
Found it! I had to enter the below on my config file:

Code:
always_direct allow SSL_ports
Now everything works as desired !

Thnaks alot for your help!!
 
Old 01-05-2014, 10:39 AM   #13
imtiaj
LQ Newbie
 
Registered: Jan 2014
Posts: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by tripialos View Post
I "partially" found my problem & solution"

Squid3 can handle https by creating tunnels with the CONNECT method. When i opened the SSL port on my firewall and added the below (which in most cases is a default) it all worked flawlessly (it also blocks https sites from squidguard imports) !

Code:
acl SSL_ports port 443
acl CONNECT method CONNECT
http_access allow CONNECT SSL_ports
The reason https CONNECT method was not working was/is because squid3 is "chained" with ziproxy. Squid3 forwards requests to ziproxy so i can have both content filtering and compression hence my new challenge now is how to make this CONNECT method of squid3 to worke wth ziproxy!

Thanks for the assistance
But how you can block any https site. You already allow https request as I am seeing. #http_access allow CONNECT SSL_ports
+++++++++++++
Imtiaz
+++++++++++++
 
Old 01-06-2014, 05:23 PM   #14
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by imtiaj View Post
But how you can block any https site. You already allow https request as I am seeing. #http_access allow CONNECT SSL_ports
+++++++++++++
Imtiaz
+++++++++++++
Hi Imtian

I am allowing https connections but prior that i am using squidguard to determine if the URL is in the blacklist, if it is, then it wont get through
 
  


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
how to deal with https with squid3 proxy tripialos Linux - Networking 10 10-11-2013 01:46 AM
[SOLVED] Unable to block HTTPS squid3 ozid Linux - Networking 3 07-25-2013 02:33 AM
Can't See https pages with Squid3 pliqui Linux - Networking 16 04-13-2009 04:05 PM
Preventing DansGuardian Bypass via HTTPS Proxies win32sux Linux - Security 16 08-19-2008 03:08 PM
bypass firewall with https proxy whatch Linux - Newbie 3 12-22-2007 04:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:08 PM.

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