Sometimes you may want to use the endpoint's IP address (which could be the address of a NAT gateway, or even web proxy) in endpoint policies. Here's how (tested in IAG 2007 SP 1 Update 2):
In
../von/InternalSite/inc/<1 for SSL, 0 for plaintext HTTP>PostPostValidate.inc, integrate the following code:
<%
dim ip
ip = GetSessionParam (g_cookie, "SourceIP")
SetSessionParamWithType g_cookie, "XSourceIP", ip, "Policy"
%>
Afterwards, you can access the parameter "XSourceIP" in your custom ("Edit in script mode") endpoint policies. I.e. you can create a policy like this one:
(XSourceIP = "192.168.42.240")