LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-03-2014, 10:23 AM   #1
CoximusPrime
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Rep: Reputation: 0
Using squid to bridge proxies


Hi,

i've never used squid before, but I work in web development and am behind a company proxy to access the Internet. I'm currently using OSx but want to use Linux. One of the tools we use if phantomJS to test our sites. On OSx, phantomJS uses the system proxy and also adheres to the exception list for local IP addresses; therefore when I run phantomJs against something like 192.168.1.10, it does not attempt to use the system proxy, but for routable IP addresses, phantomJS does use the system proxy.

On Linux however, there is a bug in that phantomJS will use the system proxy, but will ignore and exceptions, therefore it will try and use the proxy to access any IP address, even on my local network, and timeout for these. I cannot see a way around this, and the bug has been in a bug fix queue for 2 years now.

I was wondering if if would be possible to locally install squid proxy on my machine, and configure squid to forward web requests out to the company proxy for external IP addresses, but pass the request through to any exceptions which I specify (local IPs) .. Then I could set the system proxy for my desktop to its local squid proxy, so phantomJs would pass all traffic through to squid, and squid could take care of where to send requests.

Does anybody know if this is a.) possible, b.) easy, & c.) the best solution?

Thanks everyone.
 
Old 02-10-2014, 09:28 AM   #2
Nephew
LQ Newbie
 
Registered: Jun 2013
Posts: 14

Rep: Reputation: Disabled
Have not done it myself, but it should work something like this:

Install squid locally and in the squid.conf you will have:
# Define a ACL for your own pc and some around you?
# Your computer
acl mynetwork src 127.0.0.0/8
# Others around you if needed
acl mynetwork src 192.168.0.0/24
# Here you define the range that must not go to the company proxy
acl local_content dst 192.168.1.0/24
# Define the company/internet proxy as a parent
cache_peer 192.168.2.9 parent 8080 3130
# Tell squid that if gonna access something on 192.168.1.0/24 not go to the company proxy
cache_peer_access 192.168.2.9 deny mynetwork local_content
# this tells squid that 192.168.1.0/24 can be accessed directly
never_direct allow local_content
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple squid proxies routing on different internet connections shahidbashir7861 Linux - Networking 9 03-28-2013 03:12 AM
Squid transperant proxy in bridge mode rocky9 Linux - Server 1 06-18-2011 02:43 AM
Squid and parent proxies immortaltechnique Linux - Networking 7 11-16-2006 11:24 AM
How to Configure socks and squid proxies on RES HAT ENTERPRISE LINUX WS release 3 kbsudhir Red Hat 1 04-19-2006 08:55 AM
LXer: Phishing for Open Proxies: Baby Squid Hooked In Under 18 Hours LXer Syndicated Linux News 0 01-26-2006 01:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration