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

[Solved]WPAD settings for 2nd Interface

Scheduled Pinned Locked Moved pfSense Packages
3 Posts 2 Posters 504 Views
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 Jan 31, 2018, 8:44 AM Jan 31, 2018, 3:39 AM

    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
      last edited by Jan 31, 2018, 6:38 AM

      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 Jan 31, 2018, 8:44 AM

        thanks -flo- it worked.  :)

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received