Solved

Question on PAC files

Posted on 2007-12-01
3
665 Views
Last Modified: 2010-07-27
Hi

We are using PAC files in our environment. The .pac file has a list of sites that should be directed back, other requests should be sent out to the proxies.

We have a problem with clients downloading DAT files via the McAfee ftp site. If we don't use the PAC file (and configure the proxy directly in) then there is no problem.

I have run a packet capture on a laptop using the PAC file, and it appears that the requests for ftp.mcafee.com are being sent back to the internal DNS servers - not to the proxies. The internal DNS servers can't resolve the address, and the request fails.

I understand the PAC file we use is for HTTP requests only. Is this generally the case with PAC files, or can we add a line so that FTP requests are handled too?

Any help would be much appreciated!

Thanks
0
Comment
Question by:kam_uk
  • 2
3 Comments
 
LVL 7

Expert Comment

by:Wod
ID: 20388156
Setting a proxy for specific protocols example:

        function FindProxyForURL(url, host)
        {
            if (url.substring(0, 5) == "http:") {

                return "PROXY http-proxy.mydomain.com:8080";
            }
            else if (url.substring(0, 4) == "ftp:") {

                return "PROXY ftp-proxy.mydomain.com:8080";
            }
            else if (url.substring(0, 7) == "gopher:") {

                return "PROXY gopher-proxy.mydomain.com:8080";
            }
            else if (url.substring(0, 6) == "https:" ||
                     url.substring(0, 6) == "snews:") {

                return "PROXY security-proxy.mydomain.com:8080";
            }
            else {

                return "DIRECT";
            }
        }
0
 
LVL 3

Author Comment

by:kam_uk
ID: 20388250
Thanks...

  else if (url.substring(0, 4) == "ftp:") {

                return "PROXY ftp-proxy.mydomain.com:8080";

Am I correct in thinking that this line will send *all* FTP requests to the proxies? I wouldn't want to do that, just the one for ftp.mcafee.com

Do you know how I could put this in?

Many thanks - hugely appreciated

0
 
LVL 7

Accepted Solution

by:
Wod earned 500 total points
ID: 20388695
you could probably use this:

if (url.substring(0, 20) == "ftp://ftp.mcafee.com") {
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
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…

749 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