Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

PAC file Exception

Posted on 2009-12-29
1
Medium Priority
?
824 Views
Last Modified: 2013-12-08
Hi Expert s
I am currently managing a network a network that consist of three sites(A,B,C) that are connected by an mpls link. i have deployed two proxy. One proxy in site A and the second proxy in site B.
I need to write a pac file that perform the following tasks
for users that are in site A subnet 172.21.16.0/24 i want them to use proxy 1 (172.21.16.90 port 80 ) and they should failover to proxy 2: 10.4.5.90 port 80 in case proxy 1 is not active
for users that are in site B subnet 10.4.5.0/24 i want them to use proxy 2: 10.4.5.90 port 80 and they should failover to proxy 1 (172.21.16.90 port 80 ) for users that are in site B subnet 10.4.4.0/24 i want them to use proxy 2: 10.4.5.90 port 80 and they should failover to proxy 1 (172.21.16.90 port 80 )  in case proxy2 is not active in case proxy2 is not active
At the same time i want user to bypass the prxy in the following cases
If URL has no dots in host name and If IP address is internal or hostname resolves to internal IP send direct.

0
Comment
Question by:mzhaim
1 Comment
 
LVL 57

Accepted Solution

by:
giltjr earned 2000 total points
ID: 26149337
Obviously I can't test this so there are most likely (like 100% for sure) issues with the following, but this should get you started:

function FindProxyForURL(url, host)
    {
       if (isPlainHostName(host) ||
        (host == "127.0.0.1") ||
        (isInNet(host, "172.21.16.0",  "255.255.255.0")) ||
        (isInNet(host, "10.4.4.0",  "255.255.255.0")) ||
            (isInNet(host, "10.4.5.0",  "255.255.255.0")) ||
            (isInNet(host, dnsResolve("172.21.16.0") ,  "255.255.255.0"))
            (isInNet(host, dnsResolve("10.4.4.0") ,  "255.255.255.0"))
            (isInNet(host, dnsResolve("10.4.5.0") ,  "255.255.255.0")))
      return "DIRECT" ;
      else
            if (isInNet(myIpAddress(), "172.21.16.0",  "255.255.255.0"))
                  return "PROXY 172.21.16.90:80 ; PROXY 10.4.5.90:80";
            else
            if (isInNet(myIpAddress(), "10.4.4.0",  "255.255.255.0") ||
                  isInNet(myIpAddress(), "10.4.5.0",  "255.255.255.0"))
                        return "PROXY 10.4.5.90:80 ; PROXY 172.21.16.90:80 ";
     }
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
When you put your credit card number into a website for an online transaction, surely you know to look for signs of a secure website such as the padlock icon in the web browser or the green address bar.  This is one way to protect yourself from oth…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question