+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
Internet Related/Filtering/Firewall Thread, WPAD in Technical; Morning all.... I know i am flogging a dead horse here but..... I am trying to configure wPAD on the ...
  1. #1
    cmpwat's Avatar
    Join Date
    Dec 2011
    Location
    Gloucester
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    WPAD

    Morning all....

    I know i am flogging a dead horse here but..... I am trying to configure wPAD on the network and I have a feeling that my dat file is wrong. I have configured DHCP 252 to look at http://wpad.my.domain/wpad.dat. I have setup DNS to the web server for wpad. I have run the dnscmd /config /enableglobalqueryblocklist 0 on all 3 DNS servers and I have put the dat file in the c:\inetpub\wwwroot folder of my web server.

    the contents of my dat file are:

    function FindProxyForURL(url, host){
    var proxy_no = "DIRECT";

    if (shExpMatch(url, "http://helpdeskserver/*")) { return proxy_no; }
    if (shExpMatch(url, "http://helpdeskserver")) { return proxy_no; }
    if (host == "fqdn of webfilter") { return proxy_no; }

    if (isInNet(myIpAddress(), "10.107.0.0", "255.255.248.0")) { return "PROXY proxy.swgfl.org.uk:8080" };
    }

    I have set IE to automatically detect but still nothing, will not detect. I have run netsh winsock reset and rebooted and still nothing....

    Now, if there anything wrong with the dat file?

    with it only work with domain joined machines?

    any help would be gratefully received!

  2. #2

    AngryTechnician's Avatar
    Join Date
    Oct 2008
    Posts
    3,730
    Thank Post
    698
    Thanked 1,212 Times in 761 Posts
    Rep Power
    394
    Have you configured the MIME type for .dat on the server hosting the wpad.dat? I don't think IIS will serve the file without it. It should be application/x-ns-proxy-autoconfig or application/x-javascript-config (I used the former)

  3. #3
    cmpwat's Avatar
    Join Date
    Dec 2011
    Location
    Gloucester
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thanks AngryTech

    I have put the MIME in, using the same as you: application/x-ns-proxy-autoconfig

  4. #4

    AngryTechnician's Avatar
    Join Date
    Oct 2008
    Posts
    3,730
    Thank Post
    698
    Thanked 1,212 Times in 761 Posts
    Rep Power
    394
    Does it work if you put the URL of the WPAD in manually using the "Use automatic configuration script" option? That would rule out a problem with loading and using the script, vs. a problem with the WPAD detection.

  5. #5
    cmpwat's Avatar
    Join Date
    Dec 2011
    Location
    Gloucester
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    all i get is the page could not be displayed...... this is what is making me think i have the content wrong.

  6. #6
    soapyfish's Avatar
    Join Date
    Dec 2008
    Location
    Hertfordshire
    Posts
    180
    Thank Post
    49
    Thanked 7 Times in 5 Posts
    Blog Entries
    1
    Rep Power
    13
    Are you able to ping the the wpad server using the DNS name...When I set things up I needed to create DNS entries for

    wpad
    wpad.internal
    wpad.domainname

    I needed to make sure that all 3 of these were "pingable" (if thats such a word) before I was able to get wpad to work as expected.
    Also are you using windows clients or a combination of windows and Apple devices ?

  7. #7
    cmpwat's Avatar
    Join Date
    Dec 2011
    Location
    Gloucester
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Yeap, all pingable. I only have an internal domain, so both wpad and wpad.my.domain are pingable, with the right ip for the web server.

  8. #8

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,652
    Thank Post
    516
    Thanked 2,443 Times in 1,891 Posts
    Blog Entries
    24
    Rep Power
    831
    Is there a particular reason you need the "isInNet(myIpAddress()" bit? Can you try removing it, and just putting return "PROXY proxy.swgfl.org.uk:8080" at the end of the function before the }?

    In my experience, these bits are the ones that usually go wrong.
    Last edited by localzuk; 27th March 2014 at 02:39 PM.

  9. #9
    soapyfish's Avatar
    Join Date
    Dec 2008
    Location
    Hertfordshire
    Posts
    180
    Thank Post
    49
    Thanked 7 Times in 5 Posts
    Blog Entries
    1
    Rep Power
    13
    In case its of any help this is the working wpad file that I am using, I have removed the specifics but it should make sense.
    ------------------------------------------------------------------------------------------------------------------------
    function FindProxyForURL(url, host)

    {
    if (shExpMatch( host, "*INTERNAL IP ADDRESS RANGE*" )
    || shExpMatch( host, "*INTERNAL IP ADDRESS RANGE*" )
    || shExpMatch( host, "*INTERNAL IP ADDRESS RANGE*" )
    || shExpMatch( host, "*INTERNAL IP ADDRESS RANGE*" )
    || shExpMatch( host, "*INTERNAL IP ADDRESS RANGE*" )
    || shExpMatch( host, "*INTERNAL IP ADDRESS RANGE*" )
    || shExpMatch( host, "*INTERNAL IP ADDRESS RANGE*" )
    || shExpMatch( host, "*INTERNAL IP ADDRESS RANGE*" )
    || shExpMatch( host, "https://do not proxy this URL" )
    || shExpMatch( host, "https://do not proxy this URL" )
    || shExpMatch( host, "https://do not proxy this URL" )

    || shExpMatch( host, "127.*" )
    || shExpMatch( host, "localhost" )
    || shExpMatch( host, "*192.168.3.*" )
    || isPlainHostName( host )
    || dnsDomainIs( host, ".example.com" )) {
    return "DIRECT";
    }
    return "PROXY HOSTNAME:PORT; DIRECT";
    }
    Last edited by soapyfish; 27th March 2014 at 02:54 PM.

  10. #10
    cmpwat's Avatar
    Join Date
    Dec 2011
    Location
    Gloucester
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    No reason, just what was in all the samples I have looked at. I have reomved it and it still doesnt work.

  11. #11

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,652
    Thank Post
    516
    Thanked 2,443 Times in 1,891 Posts
    Blog Entries
    24
    Rep Power
    831
    So your new one looks like this now?

    Code:
    function FindProxyForURL(url, host){
    var proxy_no = "DIRECT";
    
    if (shExpMatch(url, "http://helpdeskserver/*")) { return proxy_no; }
    if (shExpMatch(url, "http://helpdeskserver")) { return proxy_no; }
    if (host == "fqdn of webfilter") { return proxy_no; }
    
    return "PROXY proxy.swgfl.org.uk:8080";
    
    }

  12. #12
    cmpwat's Avatar
    Join Date
    Dec 2011
    Location
    Gloucester
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Yeap, and the wpad is configured in DHCP and DNS and is all pingable etc......if i had hair, be tearing it out about now!

  13. #13

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,652
    Thank Post
    516
    Thanked 2,443 Times in 1,891 Posts
    Blog Entries
    24
    Rep Power
    831
    Can you get to the wpad address in a web browser? ie. go to wpad.domain.name/wpad.dat and download the file manually?

  14. #14
    cmpwat's Avatar
    Join Date
    Dec 2011
    Location
    Gloucester
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Yeap, can download the file as well!

  15. #15
    soapyfish's Avatar
    Join Date
    Dec 2008
    Location
    Hertfordshire
    Posts
    180
    Thank Post
    49
    Thanked 7 Times in 5 Posts
    Blog Entries
    1
    Rep Power
    13
    Have you restarted IIS, I know its sounds obvious but I caught me out !

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. WPAD File, Auto Detect Proxy Server
    By steveo2000 in forum Windows Server 2000/2003
    Replies: 6
    Last Post: 14th July 2010, 01:40 PM
  2. ISA + WPAD + 403 Forbidden
    By Nick_Parker in forum Internet Related/Filtering/Firewall
    Replies: 0
    Last Post: 1st October 2009, 09:22 AM
  3. WPAD Issues
    By gsk in forum Internet Related/Filtering/Firewall
    Replies: 7
    Last Post: 21st May 2009, 02:04 PM
  4. Replies: 2
    Last Post: 23rd February 2008, 05:17 PM
  5. WPAD.DAT
    By k-strider in forum Coding
    Replies: 0
    Last Post: 4th July 2007, 03:12 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •