Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
New Contributor

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 or just * the firewall is at say 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




New Contributor III

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, "*") ||  isInNet(dnsResolve(host), "", "") ||  isInNet(dnsResolve(host), "", "") ||  isInNet(dnsResolve(host), "", "") ||  isInNet(dnsResolve(host), "", ""))  {return "DIRECT"}; // If the IP address of the local machine is within a defined // subnet, send to a specific proxy. if (isInNet(myIpAddress(), "", ""))  {return "PROXY"}; }


Off course edit it per your requirements...

New Contributor

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


Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Top Kudoed Authors