Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squid random disconnects random webpages

    Scheduled Pinned Locked Moved pfSense Packages
    31 Posts 3 Posters 4.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      La6er
      last edited by

      what if my computer does not have any domain? I have set the files on another pfsense solution with the following script

      function FindProxyForURL(url,host)
      {
      return "PROXY 10.30.251.61:3128";
      }

      they are located on usr/local/www/ but if I set autodetect proxy it does not work, if I set manually http://10.30.251.59/proxy.pac (which is the ip of my http pfsense) on my browser it does not work, however if i set manually the proxy conf on the browser it works perfectly, I have set a host override on my dns resolver, and I am also using static ips on my clients

      1 Reply Last reply Reply Quote 0
      • KOMK Offline
        KOM
        last edited by

        WPAD relies on DNS having an entry for wpad on the default domain. I believe you can use a workgroup in place of a domain if you're using Windows clients. I haven't tried it but if you truly have no domain nor workgroup, you could still create an A record for wpad on your DNS and point it to pfSense LAN IP.

        1 Reply Last reply Reply Quote 0
        • L Offline
          La6er
          last edited by

          lets asume that is working properly.... my browser behavior will be... ask for the file, go to 10.30.251.59/proxy.pac and then overwrite it's own configuration with the proxy info I have set, correct? in this case 10.30.251.61:3128... in order to test if this is working I need to go to http://10.30.251.59/proxy.pac on my browser and a file should start downloading, correct? if that is the case I am not able to acomplish it, for some reason I am no able to download the file

          1 Reply Last reply Reply Quote 0
          • KOMK Offline
            KOM
            last edited by

            Yes to all. What error do you get when you try to download the wpad file?

            1 Reply Last reply Reply Quote 0
            • L Offline
              La6er
              last edited by

              0_1542142504026_7aa2bb21-b113-4298-bd67-2195aef06493-imagen.png

              this is the error

              1 Reply Last reply Reply Quote 0
              • L Offline
                La6er
                last edited by

                I have static IPs on my clients...

                is this script correct?

                function FindProxyForURL(url,host)
                {
                return "PROXY 10.30.251.61:3128";
                }

                1 Reply Last reply Reply Quote 0
                • KOMK Offline
                  KOM
                  last edited by

                  Perhaps you should figure out why your web server at 10.30.251.59 isn't responding.

                  Yes, your wpad.dat is correct, but it will force the proxy even for local connections. I use:

                  function FindProxyForURL(url,host)
                  {
                  // If the requested website is hosted within the internal network, send direct.
                      if (isPlainHostName(host) ||
                          shExpMatch(host, "*.local") ||
                          isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0") ||
                          isInNet(dnsResolve(host), "172.16.0.0",  "255.240.0.0") ||
                          isInNet(dnsResolve(host), "192.168.0.0",  "255.255.0.0") ||
                          isInNet(dnsResolve(host), "127.0.0.0", "255.255.255.0"))
                          return "DIRECT";
                  // Else use the proxy
                      return "PROXY 10.10.4.1:3128";
                  }
                  
                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    La6er
                    last edited by

                    Thanks for all your help, I created a second instance of the nginx using this guide https://nguvu.org/pfsense/pfSense-2.3-WPAD-PAC-proxy-configuration-guide/

                    Everything related to nagivations seems to be working perfectly fine now...

                    but I have another tiny issue, when using the proxy mi clients are not able to use nat rules set on the firewall... as soon as I stop the squid they work perfectly, any ideas about this?

                    1 Reply Last reply Reply Quote 0
                    • KOMK Offline
                      KOM
                      last edited by

                      Not off the top of my head with no detail about your config.

                      Try posting a new topic for that issue.

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        La6er
                        last edited by

                        alright, will do, thanks a lot for your support on this, I really appreciate it

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.