Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
jcm05
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 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 2
baggins
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, "*.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
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.

Labels
Top Kudoed Authors