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

    [Solved]WPAD settings for 2nd Interface

    pfSense Packages
    2
    3
    499
    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.
    • G
      ghinthsh
      last edited by

      Hi!

      My current config is Squid + Squidguard WPAD

      WAN: 192.168.10.5
      LAN: 192.168.0.1/24

      WPAD Settings

      function FindProxyForURL(url, host) 
      {
          if (isPlainHostName(host) ||
              shExpMatch(host, "*.local") ||
              isInNet(dnsResolve(host), "192.168.0.0",  "255.255.255.0"))
              return "DIRECT";
      
          return "PROXY 192.168.0.1:3128";
      }
      

      I am planning to add WLAN Interface and also want to apply wpad settings on wpad

      WLAN: 192.168.1.0/24

      is it possible to configure wpad pointing to 192.168.0.1 and 192.168.1.1?

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • -flo- 0-
        -flo- 0
        last edited by

        Try this:

        // If the IP address of the local machine is within a defined
        // subnet, send to a specific proxy.
            if (isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0"))
                return "PROXY 192.168.1.1:3128";
        
            if (isInNet(myIpAddress(), "192.168.0.0", "255.255.255.0"))
                return "PROXY 192.168.0.1:3128";
        
        1 Reply Last reply Reply Quote 0
        • G
          ghinthsh
          last edited by

          thanks -flo- it worked.  :)

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