LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to bypass squid proxy to particular client (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-bypass-squid-proxy-to-particular-client-4175418930/)

roopakl 07-27-2012 07:21 AM

how to bypass squid proxy to particular client
 
Hi All,
I have configured squid transparent proxy(squid3-3.1.19) server on ubuntu 12.04 and everything is working fine.
By default all LAN user's port 80 request is redirecting to squid port 3128. But I don't want to redirect one of the client(172.16.0.*/16)'s port 80 request to 3128 and server should be working as only router to only that particular machine(172.16.0.*/16) and also there won't be any squid logs for this particular IP, which means I want to send port 80 request or all port requests that are coming from 172.16.0.*/16 to internet directly.
So is it possible to achieve this either using iptables rules or squid ACLs.
Thanks in advanse for your kind help.

acid_kewpie 07-27-2012 07:43 AM

well clearly you can't bypass squid with squid config, but yes you can certainly change the redirection rule to exclude that IP, just add "-s ! 172.16.12.34" to the entry.

I wouldn't generally suggest that you shoudln't bypass squid though, but give it special rules within squid with an ACL.

roopakl 07-27-2012 09:52 AM

Thanks acid_kewpie
Quote:

just add "-s ! 172.16.12.34" to the entry.
Could please mention where I have to add this entry i.e
Code:

FORWARD chain?
or
nat table?

I request you to post the full command.

acid_kewpie 07-27-2012 01:07 PM

well it's the nat table your redirect to port 3128 is on isn't it?

roopakl 07-27-2012 09:52 PM

Quote:

Originally Posted by acid_kewpie (Post 4739569)
well it's the nat table your redirect to port 3128 is on isn't it?

Yes acid_kewpie, it is on, how can I prevent by redirecting port 80 request from 172.16.0.128/16 machine to squid port 3128.
I request you to post the command.
Code:

172.16.0.128/16 --->port 80 request--->should directly goes to internet.
not like below
172.16.0.128/16 --->port 80 request--->squid port 3128--->internet


roopakl 07-29-2012 11:56 PM

May I get your kind help for the above?

acid_kewpie 07-30-2012 02:00 AM

you already have a redirect rule, just add the bit I gave you on to it.


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