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 10-10-2005, 11:44 PM   #1
depam
Member
 
Registered: Sep 2005
Posts: 824

Rep: Reputation: 30
IP Route/IP Tables


Is there a way to point clients to a squid server automatically when they have obtained their IP addresses? I was able to setup squid and reconfigured the browser by adding the host and port and it went well on browsing. However, i want it to automatically see the squid as the proxy so i won't have to type in the host and port on the browser. Can anyone please help me on this? Thanks.
 
Old 10-12-2005, 12:48 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,165
Blog Entries: 54

Rep: Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807
You could prolly muck around with redirecting ports but sane browsers support either the automatic proxy URI where you serve a proxy.pac or can use a local proxy.pac file. Here's an example:

Code:
function FindProxyForURL(url, host)
{
        // Direct connections to non-FQDN hosts
        if (isPlainHostName(host)) 
            return "DIRECT";

        // Direct connections to local domain
        else if (dnsDomainIs(host, ".localnet")) 
            return "DIRECT";

        else if (shExpMatch(url, "https://*"))
            return "DIRECT";

        else if (shExpMatch(host, "www.[a-h]*") || shExpMatch(host, "[a-h]*"))
            return "PROXY localnet:8080; " +
                   "PROXY localnet:8080; " +
                   "DIRECT";
        else if (shExpMatch(host, "www.[i-z]*") || shExpMatch(host, "[i-z]*"))
            return "PROXY localnet:8081; " +
                   "PROXY localnet:8081; " +
                   "DIRECT";
        else
            return "PROXY localnet:8082; " +
                   "PROXY localnet:8082; " +
                   "DIRECT";

}
 
Old 10-12-2005, 02:10 PM   #3
pddm
Member
 
Registered: Sep 2005
Distribution: Slackware 13.37
Posts: 111

Rep: Reputation: 15
If you configure it to be transparent, there is no need to configure the browsers.
 
  


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
how to route internal Networks by IP tables? quazidaniel Linux - Networking 4 10-12-2005 10:32 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
if a route fails in a multipath route? eantoranz Linux - Networking 5 07-03-2005 02:03 PM
ADSL as a Alternate route or backup route bhagat2000 Linux - Networking 0 05-27-2004 03:17 PM
Working with 'route' and unwanted route entries pioniere Linux - Networking 6 02-05-2003 12:14 PM


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