F5 IIS Log获取客户端源IP

1.配置F5启用X-Forwarded-For方法:

1:Local Traffic-Profiles-Http-改"Insert XForwarded For"为Enable 
2:Local Traffic-Virtual servers-点击需要改动的VS-将Type选项更改为Standard-将HTTP Profile 选项更改为Http

2.配置IIS(https://devcentral.f5.com/articles/x-forwarded-for-log-filter-for-windows-servers):

  1. Download and unzip the F5XForwardedFor.zip distribution.
  2. Copy the F5XForwardedFor.dll file from the x86\Release or x64\Release directory (depending on your platform) into a target directory on your system.  Let‘s say C:\ISAPIFilters.
  3. Ensure that the containing directory and the F5XForwardedFor.dll file have read permissions by the IIS process.  It‘s easiest to just give full read access to everyone.
  4. Open the IIS Admin utility and navigate to the web server you would like to apply it to.
  5. For IIS6, Right click on your web server and select Properties.  Then select the "ISAPI Filters" tab.  From there click the "Add" button and enter "F5XForwardedFor" for the Name and the path to the file "c:\ISAPIFilters\F5XForwardedFor.dll" to the Executable field and click OK enough times to exit the property dialogs.  At this point the filter should be working for you.  You can go back into the property dialog to determine whether the filter is active or an error occurred.
  6. For II7, you‘ll want to select your website and then double click on the "ISAPI Filters" icon that shows up in the Features View.  In the Actions Pane on the right select the "Add" link and enter "F5XForwardedFor" for the name and "C:\ISAPIFilters\F5XForwardedFor.dll" for the Executable.  Click OK and you are set to go.
时间: 2024-08-05 00:44:44

F5 IIS Log获取客户端源IP的相关文章

socket.io获取客户端的IP地址(修正官方1.0.4版本BUG)

之前我有看过别人写的文章,说到如何获取客户端IP地址,代码如下: var io = require("socket.io").listen(server); io.sockets.on("connection", function (socket) { var address = socket.handshake.address; console.log("New connection from " + address.address + &qu

获取客户端真实IP地址

1.需要引入log4j-1.2.14.jar package org.ydd.test; import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; /** * @author coco * @version * 获取IP4 */ public class IP4 { private static final Logger log = Log

php获取客户端真实IP 防止代理和作弊

获取客户端ip其实不是个简单的活儿,因为存在Ip欺骗,和代理问题,所以获取客户端的IP的真实性会打折扣的,不能百分百准确.但是我们还是尽量找一个比较完善的获取客户端真正ip方法.使用php获取IP的方法能找到很多. getIp function getIp() { if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) $ip

获取客户端的IP地址

/// <summary> /// 获取客户端的IP地址 /// </summary> /// <returns></returns> public static string ClientIP() { string result = String.Empty; result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (result

服务器端获取客户端的IP地址(当客户端调用由Axis开发的WebService)

一.前言 由于项目中一个小的模块需要获取客户端的IP地址以保证安全调用webservice接口,项目中客户端使用C#编写,服务器端使用Java编写,服务器端与客户端采用Axis开发的WebService进行通信.服务器端维护IP白名单列表,只有IP地址在白名单中的客户端才可以成功调用到接口,获得服务. 二.代码清单 若要成功获取客户端IP地址,需要如下Jar包的支持. servlet-api.jar axis.jar axis2-kernel-1.6.2.jar 获取IP地址的具体代码如下: i

如何在开发过程中获取客户端的ip呢?

在开发工作中,我们常常需要获取客户端的IP.一般获取客户端的IP地址的方法是:request.getRemoteAddr();但是在通过了Apache,Squid等反向代理软件就不能获取到客户端的真实IP地址了. 原因:由于在客户端和服务之间增加了中间代理,因此服务器无法直接拿到客户端的IP,服务器端应用也无法直接通过转发请求的地址返回给客户端.. 解决办法:在转发请求的HTTP头信息中,增加X-FORWARDED-FOR信息.用以跟踪原有的客户端IP地址和原来客户端请求的服务器地址.当我们访问

nginx在varnish后端做负载均衡,后端tomca获取客户端真实IP

nginx在varnish后端做负载均衡,后端tomca获取客户端真实IP 1.设置nginx配置文件    首先要确定nginx做负载均衡,在安装时把http_realip_module 安装上了.    查看方法: /usr/local/nginx/sbin/nginx -V   配置nginx.conf    vim /usr/local/nginx/conf/nginx.conf   加入 set_real_ip_from 192.168.88.131;      重新加载nginx:

asp网络编程:ASP如何获取客户端真实IP地址

要想透过代理服务器取得客户端的真实IP地址,就要使用 Request.ServerVariables("HTTP_X_FORWARDED_FOR") 来读取.不过要注意的事,并不是每个代理服务器都能用 Request.ServerVariables("HTTP_X_FORWARDED_FOR") 来读取客户端的真实 IP,有些用此方法读取到的仍然是代理服务器的IP.还有一点需要注意的是:如果客户端没有通过代理服务器来访问,那么用 Request.ServerVari

PHP获取客户端的IP

function getClientIP(){    global $ip;    if (getenv("HTTP_CLIENT_IP"))        $ip = getenv("HTTP_CLIENT_IP");    else if(getenv("HTTP_X_FORWARDED_FOR"))//用了代理服务器时        $ip = getenv("HTTP_X_FORWARDED_FOR");    els