Skip to main content
jcm05
New Member
May 5, 2019
Question

Basic Pac file setup

Im having a little trouble creating a pac file for my new fortigate 300d. Our old firewall would self generate the wpad settings on each access as long as you had the proxy settings configured as a group policy in Active directory.  What Im trying to do is create a pac file for say firewall.localdomain.com or just *.localdomain.com the firewall is at say 172.16.0.220 port 8080 and I want to by bypass the proxy for all local traffic on ip's 172.16.*; and 192.168.* is there someone who could help me with this so I can have my dhcp clients auto configured. Thanks

 

 

 

    2 replies

    baggins
    New Member
    May 15, 2019

    Hi jcm05...

     

    Try with this one...

     

    function FindProxyForURL(url, host) { // If the requested website is hosted within the internal network, send direct. if (isPlainHostName(host) ||  shExpMatch(host, "*.localdomain.com") ||  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"}; // If the IP address of the local machine is within a defined // subnet, send to a specific proxy. if (isInNet(myIpAddress(), "172.25.0.0", "255.255.0.0"))  {return "PROXY 172.16.0.22:8080"}; }

     

    Off course edit it per your requirements...

    jcm05
    jcm05Author
    New Member
    May 15, 2019

    Thanks for the help I grab some examples of Microsoft's website and put one together. Tested and is in production working. thanks again.

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT