Squid proxy w/ Dansguardian Ubuntu wpad.dat not working

Discussion in 'HOWTO-Related Questions' started by drake495, Jul 11, 2009.

  1. drake495

    drake495 New Member

    Hi all,

    I have set up the squid proxy server with dansguardian following

    It is working correctly except for one detail.

    I configured the proxy server to serve the wpad.dat file with apache. It serves the page fine when you browse to

    (Manually setting the proxy in the browser works perfectly btw)

    However all browsers on multiple OS's prompt the download, but don't know what to do with it afterwards.

    I set the mime type up as instructed in the tutorial.
    derek@proxy:/var/www$ cat /etc/apache2/httpd.conf
    AddType application/x-ns-proxy-autoconfig .dat

    And I made sure to reload apache2 settings.

    Is there something I'm missing? I set firefox to auto-detect proxy settings for this network, but it isn't configuring the proxy in the browser.

    It works if I put in the automatic proxy configuration url box but thats not what the tutorial said to do.

    Here is the script.

    derek@proxy:/var/www$ cat wpad.dat
    function FindProxyForURL(url, host)
    if (isInNet(host, "", ""))
    return "DIRECT";
    return "PROXY";

    Do I need to chmod the script to make it executable? (edit: that didn't work either)
    Any help is appreciated.
  2. mtcoombes

    mtcoombes New Member

    A question that comes to mind immediately is, did you set up DHCP and/or DNS? The wpad.dat script is only hosted by the web server, but the auto-detect portion is handled by option 252 in DHCP, i.e. without some means of telling the clients where to find the script, you'll have to manually point them to the script.
  3. drake495

    drake495 New Member

    Thanks, I will look into that. It's not a huge deal. I was just trying to figure out what I had overlooked.

    I am just learning for future projects. In the future I will have an actual dhcp server and not just my linksys router with dd-wrt on it.

    Although dd-wrt is pretty cool.
  4. Upsurged

    Upsurged New Member

    Hi, I am new to the above subject as well. I wante to install the squid for faster browsing in my home network with proxy auto detect. The above tutorial is working fine, if i note the squid server address in the browser, but the option Auto-detect is not working. Any help would be appreciated.

    I have included the below after referring to other posts, still no luck.

    option custom-proxy-server code 252 = text;
    option custom-proxy-server "";
  5. m1_davidson

    m1_davidson New Member

    Not sure whether this is still an issue for you. Is your DHCP server working (i.e. giving out IP settings)?

Share This Page