Solved

Question on PAC files

Posted on 2007-12-01
3
659 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Resolve DNS query failed errors for Exchange
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now