Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-09-2013, 06:29 AM
|
#1
|
Member
Registered: Apr 2012
Posts: 169
Rep: 
|
how to deal with https with squid3 proxy
Greetings
I am facing an issue here and i am a bit confused.
I have setup a web proxy server using squid3. All works well apart from the fact that https pages cannot be displayed. After some googling i found out that in order to proxy https request you have to do some sort of MiTM implementation which is too much fuzz.
Is there a way to just forward the https requests to their destination without any interferance by squid3?
I mean, how does all other web proxies in the world deal with this https issue?
Thanks
|
|
|
10-09-2013, 06:49 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
What you appear to want is the default behaviour for squid:
http://wiki.squid-cache.org/SquidFaq/ConfiguringSquid
the entry
Code:
http_access deny CONNECT !SSL_ports
says that if you are not on an SSL port, ie..g 443 by default, then you can not use the HTTP CONNECT method, which is how a client requests HTTPS access to a remote site explicitly from a proxy. The later line
Code:
http_access allow localnet
would then permit that access if you ARE requesting a CONNECT on port 443 from an IP address defined in the localnet ACL.
The most likely reason that springs to mind for why you might be having trouble is if you're trying to use squid transparently? If so, it's much much harder, hence the mitm stuff. Don't do it transparently if you can avoid it.
Last edited by acid_kewpie; 10-09-2013 at 06:51 AM.
|
|
1 members found this post helpful.
|
10-10-2013, 03:27 AM
|
#3
|
Member
Registered: Apr 2012
Posts: 169
Original Poster
Rep: 
|
Quote:
Originally Posted by acid_kewpie
What you appear to want is the default behaviour for squid:
http://wiki.squid-cache.org/SquidFaq/ConfiguringSquid
the entry
Code:
http_access deny CONNECT !SSL_ports
says that if you are not on an SSL port, ie..g 443 by default, then you can not use the HTTP CONNECT method, which is how a client requests HTTPS access to a remote site explicitly from a proxy. The later line
Code:
http_access allow localnet
would then permit that access if you ARE requesting a CONNECT on port 443 from an IP address defined in the localnet ACL.
The most likely reason that springs to mind for why you might be having trouble is if you're trying to use squid transparently? If so, it's much much harder, hence the mitm stuff. Don't do it transparently if you can avoid it.
|
Thanks for acid
I do get your point .. but what i am thinking to do is slightly more complecated, i wouldnt mind a tough solution but at least i am trying to find one.
i have:
---------------LAN-----------------
---------------------------------------------------------------------
| clients|---------->|Mikrotik|----------->| Linux-Squid sever|
---------------------------------------------------------------------
Mikrotik works as the gateway and as trasparent proxy for the clients. It is configured to use the Linux-squid as a proxy.
My problem is that squid does the content filtering hence if i set Mikrotik to bypass https and not forward connections the i will lose the content filtering on the https pages .
Any help would be really much appriciated!
Last edited by tripialos; 10-10-2013 at 03:47 AM.
|
|
|
10-10-2013, 04:02 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Well there's the "t" word as feared... but you have... two proxies here? Whatever the router can do it transparent but squid is not? That sounds messy. is the router proxying? or just redirecting the raw TCP traffic?
Ditch transparency and everything will get MUCH easier and nicer and simpler. If you have issues about configuring clients to explicitly use a proxy, then there are plenty of centralised options available like a proxy.pac or wpad.dat file hosted on an internal web server.
|
|
|
10-10-2013, 06:11 AM
|
#5
|
Member
Registered: Apr 2012
Posts: 169
Original Poster
Rep: 
|
Quote:
Originally Posted by acid_kewpie
Well there's the "t" word as feared... but you have... two proxies here? Whatever the router can do it transparent but squid is not? That sounds messy. is the router proxying? or just redirecting the raw TCP traffic?
Ditch transparency and everything will get MUCH easier and nicer and simpler. If you have issues about configuring clients to explicitly use a proxy, then there are plenty of centralised options available like a proxy.pac or wpad.dat file hosted on an internal web server.
|
The router and the clients are on the same lan..the Linux Squid proxy is on the WAN.
Yes the router is configured to proxy with the Squid proxy as its parent. The reason i used the router (appart from the fact that it performs the hotspot functions) is so i can do the proxying transparently ... I mean how could i provide trasparent proxying if my proxy is outside the LAN where the clients reside ?
So, i proxy all the traffic from the LAN towards the squid server and from there i do content filtering but if i set the router to bypass the https then i dont have content filtering.
Now i am thinking of it again...there isnt any solution to this... isnt it?
|
|
|
10-10-2013, 06:20 AM
|
#6
|
Member
Registered: Feb 2008
Location: Armidale, NSW, Australia
Distribution: Fedora 8
Posts: 32
Rep:
|
Quote:
Originally Posted by tripialos
...there isnt any solution to this... isnt it?
|
No there isn't. If you want to analyse the content of HTTPS traffic, you must be able to decrypt it - which of course involves proxying the SSL component (MITM).
|
|
|
10-10-2013, 06:28 AM
|
#7
|
Member
Registered: Apr 2012
Posts: 169
Original Poster
Rep: 
|
Quote:
Originally Posted by cospengle
No there isn't. If you want to analyse the content of HTTPS traffic, you must be able to decrypt it - which of course involves proxying the SSL component (MITM).
|
Well .. i am not actually going to do anything with the content, its just that squid uses blacklists in order to block specific pages
|
|
|
10-10-2013, 08:53 AM
|
#8
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Yes there is a solution. Stop doing things transparently. Or do an ugly MITM thing. They are both genuine solutions.
You ARE doing things with the content, HTTP headers ARE content here.
|
|
1 members found this post helpful.
|
10-10-2013, 09:11 AM
|
#9
|
Member
Registered: Apr 2012
Posts: 169
Original Poster
Rep: 
|
Quote:
Originally Posted by acid_kewpie
Yes there is a solution. Stop doing things transparently. Or do an ugly MITM thing. They are both genuine solutions.
You ARE doing things with the content, HTTP headers ARE content here.
|
Yes you are right...I assume you mean configure the clients to use the squid proxy correct?
|
|
|
10-10-2013, 09:57 AM
|
#10
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Quote:
Originally Posted by tripialos
Yes you are right...I assume you mean configure the clients to use the squid proxy correct?
|
yes, but as above there are ways to simplify this considerably if you have a lot of clients.
|
|
|
10-11-2013, 01:46 AM
|
#11
|
Member
Registered: Apr 2012
Posts: 169
Original Poster
Rep: 
|
Quote:
Originally Posted by acid_kewpie
yes, but as above there are ways to simplify this considerably if you have a lot of clients.
|
Thanks for the "consulting" acid_kewpie!
|
|
|
All times are GMT -5. The time now is 07:37 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|