AVONFRS
asked on
PAC File not working on multiple IP range
I have been looking into PAC files for proxy autoconfiguration on Internet Explorer.
We have multiple sites, and for a test PAC file, i have put 2 of these sites. One is on a 90 & the other is a 92 range.
Is the attached code correct? I have put just the 92 one in on a file by itself, and that worked fine. But when i try to add more than one range, it doesnt like it, and doesnt do anything.
Am i doing anything wrong?
We have multiple sites, and for a test PAC file, i have put 2 of these sites. One is on a 90 & the other is a 92 range.
Is the attached code correct? I have put just the 92 one in on a file by itself, and that worked fine. But when i try to add more than one range, it doesnt like it, and doesnt do anything.
Am i doing anything wrong?
function FindProxyForURL(url,host)
{
if (
isInNet(myIpAddress(), "192.168.90.0", "255.255.248.0") ||
isInNet(myIpAddress(), "192.168.92.0", "255.255.248.0")
)
return "PROXY 192.168.90.14:8000";
else return "DIRECT";
}
ASKER
Thanks for that information.
We have 25 locations each with different range, to our Headquarters which is 88-93. Headquarters has a 255.255.248.0 subnet mask, but the other 25 has 255.255.255.0
How would i go about adding for the rest of the sites with a subnet mask 255.255.255.0 and ip ranges:
90.104, 90.2, 90.3, 90.4, 90.5, 90.6, 90.7, 90.8, 90.10, 90.11, 90.12, 90.13, 90.14, 90.15, 90.16, 90.17, 90.18, 90.19, 90.20, 90.21, 90.22, 90.23, 90.24 & 90.25
Your help is appreciated if you can provide it.
We have 25 locations each with different range, to our Headquarters which is 88-93. Headquarters has a 255.255.248.0 subnet mask, but the other 25 has 255.255.255.0
How would i go about adding for the rest of the sites with a subnet mask 255.255.255.0 and ip ranges:
90.104, 90.2, 90.3, 90.4, 90.5, 90.6, 90.7, 90.8, 90.10, 90.11, 90.12, 90.13, 90.14, 90.15, 90.16, 90.17, 90.18, 90.19, 90.20, 90.21, 90.22, 90.23, 90.24 & 90.25
Your help is appreciated if you can provide it.
I don't quite understand what you're asking. HQ network is 192.168.88.0 255.255.248.0 to 192.168.95.255 255.255.248.0 - that is one logical network.
Can you please provide the fully IP address and subnet mask ranges for these other sites (90.104, 90.2 is meaningless - 192.90.104.0 has meaning).
Can you please provide the fully IP address and subnet mask ranges for these other sites (90.104, 90.2 is meaningless - 192.90.104.0 has meaning).
ASKER
Headquarters has a range of 192.168.88.0 - 192.168.93.0
The rest of the sites go like this:
192.168.2.0 - 255.255.255.0
192.168.3.0 - 255.255.255.0
192.168.4.0 - 255.255.255.0
192.168.5.0 - 255.255.255.0
192.168.6.0 - 255.255.255.0
192.168.7.0 - 255.255.255.0
192.168.8.0 - 255.255.255.0
192.168.10.0 - 255.255.255.0
192.168.11.0 - 255.255.255.0
192.168.12.0 - 255.255.255.0
192.168.13.0 - 255.255.255.0
192.168.14.0 - 255.255.255.0
192.168.15.0 - 255.255.255.0
192.168.16.0 - 255.255.255.0
192.168.17.0 - 255.255.255.0
192.168.18.0 - 255.255.255.0
192.168.19.0 - 255.255.255.0
192.168.20.0 - 255.255.255.0
192.168.21.0 - 255.255.255.0
192.168.22.0 - 255.255.255.0
192.168.23.0 - 255.255.255.0
192.168.24.0 - 255.255.255.0
192.168.25.0 - 255.255.255.0
192.168.104.0 - 255.255.255.0
All of these sites need to go through the proxy server 192.168.90.14:8000
Therefore i need the PAC to go through the list to see if the ip address is in one of those ranges.
The rest of the sites go like this:
192.168.2.0 - 255.255.255.0
192.168.3.0 - 255.255.255.0
192.168.4.0 - 255.255.255.0
192.168.5.0 - 255.255.255.0
192.168.6.0 - 255.255.255.0
192.168.7.0 - 255.255.255.0
192.168.8.0 - 255.255.255.0
192.168.10.0 - 255.255.255.0
192.168.11.0 - 255.255.255.0
192.168.12.0 - 255.255.255.0
192.168.13.0 - 255.255.255.0
192.168.14.0 - 255.255.255.0
192.168.15.0 - 255.255.255.0
192.168.16.0 - 255.255.255.0
192.168.17.0 - 255.255.255.0
192.168.18.0 - 255.255.255.0
192.168.19.0 - 255.255.255.0
192.168.20.0 - 255.255.255.0
192.168.21.0 - 255.255.255.0
192.168.22.0 - 255.255.255.0
192.168.23.0 - 255.255.255.0
192.168.24.0 - 255.255.255.0
192.168.25.0 - 255.255.255.0
192.168.104.0 - 255.255.255.0
All of these sites need to go through the proxy server 192.168.90.14:8000
Therefore i need the PAC to go through the list to see if the ip address is in one of those ranges.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
NETWORK=192.168.88.0
BROADCAST=192.168.95.255
So you only need one entry as your network is actually just one network.
Hope this helps.