Supondo que você esteja executando pelo menos a Web Interface 5.x, é possível configurá-la para ver o endereço IP real do cliente que se conecta por meio de o gateway .
Localize a seguinte seção em $SITEROOT/Citrix/XenApp/app_code/PagesJava/com/citrix/wi/pageutils/Include.java
:
/**
* Returns the IP address of the client
*
* @return the client IP address as a string
*/
public static String getClientAddress(WIContext wiContext) {
String ageClientAddress = AGEUtilities.getAGEClientIPAddress(wiContext);
return (ageClientAddress != null
? ageClientAddress
: wiContext.getWebAbstraction().getUserHostAddress());
}
Substitua esta seção inteira pelo seguinte:
/**
* Returns the IP address of the client.
*
* @return the client IP address as a string
*/
public static String getClientAddress(WIContext wiContext) {
WebAbstraction web = wiContext.getWebAbstraction();
String gatewayAddress = "127.0.0.1"; // change as appropriate if Gateway is on another server
boolean comingFromGateway = web.getUserHostAddress().equals(gatewayAddress);
String forwardedAddress = web.getRequestHeader("X-Forwarded-For");
String ageClientAddress = AGEUtilities.getAGEClientIPAddress(wiContext);
if (ageClientAddress != null) {
return ageClientAddress;
} else if (comingFromGateway && (forwardedAddress != null)) {
return forwardedAddress;
} else {
return web.getUserHostAddress();
}
}