Forum Discussion
Luca_55898
Jul 05, 2011Nimbostratus
Thanks for the reply.
The issue i'm having is that the iRule does not seem to send the proxy server for external sites. So when I assign the VIP to a clients browser they can't access the web. Internal sites work fine so that side of things looks to be working.
The iRule now looks like this (i removed the dnsDomainIs sections)
Note - the proxy that this iRule should return is another VIP on the same LTM, is that OK?
when RULE_INIT {
set static::pacfile {
function FindProxyForURL(url, host) {
if (isPlainHostName(host))
return "DIRECT";
if (host.substring(0,3)=="10.")
return "DIRECT";
if (shExpMatch(url,"*.messages.*") ||
shExpMatch(url,"*remote.ourbusiness.com.au*") ||
shExpMatch(url,"*ww.ourbusiness.com.au*"))
shExpMatch(url,"*gobusiness.*") ||
shExpMatch(url,"*firstcust.*") ||
shExpMatch(url,"*longday.*") ||
shExpMatch(url,"*rosshome.*") ||
shExpMatch(url,"*ourbusiness.com*") ||
shExpMatch(url,"*portal.ourbusiness.com.au*") ||
shExpMatch(url,"*ourbusiness.com.au*") ||
shExpMatch(url,"*w2.ourbusiness.com.au*") ||
shExpMatch(url,"*w3.ourbusiness.com.au*") ||
shExpMatch(url,"*msgpooled.com*") ||
shExpMatch(url,"*corporateorders.com*") ||
shExpMatch(url,"*generic.com.au*") ||
shExpMatch(url,"*.ecommerce.com*") ||
shExpMatch(url,"*.paymentpage.com*") ||
shExpMatch(url,"*.mpt.com.*") ||
shExpMatch(url,"*.customercentral.com*") ||
shExpMatch(url,"*.informatic.com*"))
return "DIRECT";
return "PROXY proxy1.ourbusiness.com:3128";
}
}
}
when HTTP_REQUEST {
switch [HTTP::uri] {
"/proxy.pac" {
HTTP::respond 200 content $static::pacfile "Content-Type" "application/x-ns-proxy-autoconfig" "pragma" "no-cache"
}
}
}