首页 > 其他分享 >F5 Insert XForwarded For配置

F5 Insert XForwarded For配置

时间:2023-12-01 15:31:40浏览次数:25  
标签:profile Insert HTTP F5 Proto IP XForwarded following Forwarded

一、应用场景:

 统一权限系统用户登录日志中登录IP一直显示10.122.6.70,而不是用户电脑的实际IP,

经查证该IP为F5负载均衡设备IP。登录IP一直显示F5设备IP原因为,网络组为统一权限

系统的虚拟IP配置连接池时http参数没有开启Insert XForwarded For服务导致。与网络

组沟通重新创建profile_http参数后问题得到解决(实际名称为tyqx_http)。

二、WEB配置

以下为创建Profiles配置:profile_http

  在“Local Traffic→Profiles”页面点击“create”按钮:

  ①Name栏填写:profile_http(填一个英文名称)

  ②Parent Profile栏选择:HTTP

  ③Insert XForwarded For栏:如果需要,可以选中方框,选择Enable(在Header头中插入x-forwarded-for标记,以便做七层负载均衡时能够获取用户真实IP)。配置Insert XForwarded For后在连接池中http选择栏中选择tyqx_http,用户登录统一权限系统时,用户登录日志中登录IP即显示用户电脑的真实IP。

三、命令行配置

Configuring the BIG-IP system to insert the HTTP X-Forwarded-Proto header extension

Topic

You should consider using this procedure under the following condition:

  • You use the BIG-IP system to terminate Secure Sockets Layer (SSL) for load-balanced HTTP servers that support the X-Forwarded Proto header extension.
  • You want the HTTP servers to return URLs prefixed with HTTPS://.
Description

When you configure the BIG-IP system to terminate SSL for HTTP servers that support the X-Forwarded-Proto header extension, you can ensure that the HTTP servers respond with HTTPS:// prefixed URLs. To utilize the X-Forwarded-Proto header extension, you can configure the BIG-IP system to insert an HTTP header named X-Forwarded-Proto: with a value of https into each request. To do so, perform one of the following procedures using either the Configuration utility or the TMOS Shell (tmsh).

Prerequisites

You must meet the following prerequisite to use this procedure:

  • You have administrative access to the BIG-IP system.

Procedures

Using the Configuration utility to create a custom HTTP profile to insert the X-Forwarded-Proto:https HTTP header

To create a custom HTTP profile that inserts an HTTP header named X-Forwarded-Proto: with a value of https into each request, perform the following procedure:

Impact of procedure: Performing the following procedure should not have a negative impact on your system.

  1. Log in to the Configuration utility.
  2. Navigate to Local Traffic > Profiles > Services > HTTP.
  3. Click Create.
  4. In the Name box, type a name for the profile.
  5. In the Parent Profile menu, select http.
  6. For the Request Header Insert setting, select the custom check box.
  7. In the Request Header Insert box, type the following:X-Forwarded-Proto:https
  8. Click Finished.

Using tmsh to create a custom HTTP profile to insert the X-Forwarded-Proto:https HTTP header

To create a custom HTTP profile that inserts an HTTP header named X-Forwarded-Proto: with a value of https into each request, perform the following procedure:

Impact of procedure: Performing the following procedure should not have a negative impact on your system.

  1. Log in to tmsh by typing the following command:tmsh
  2. To create the custom HTTP profile, use the following command syntax:create /ltm profile http <http profile name> header-insert "X-Forwarded-Proto:https"
  • In this command syntax, note the following:<http profile_name> is your desired HTTP profile name.
  1. Save the configuration by typing the following command:save /sys config
  2. To exit tmsh, type the following command:quit

标签:profile,Insert,HTTP,F5,Proto,IP,XForwarded,following,Forwarded
From: https://blog.51cto.com/u_7575433/8647803

相关文章

  • SQL 数据操作技巧:SELECT INTO、INSERT INTO SELECT 和 CASE 语句详解
    SQLSELECTINTO语句SELECTINTO语句将数据从一个表复制到一个新表中。SELECTINTO语法将所有列复制到新表中:SELECT*INTOnewtable[INexternaldb]FROMoldtableWHEREcondition;只复制一些列到新表中:SELECTcolumn1,column2,column3,...INTOnewtable[INexte......
  • SQL 数据操作技巧:SELECT INTO、INSERT INTO SELECT 和 CASE 语句详解
    SQLSELECTINTO语句SELECTINTO语句将数据从一个表复制到一个新表中。SELECTINTO语法将所有列复制到新表中:SELECT*INTOnewtable[INexternaldb]FROMoldtableWHEREcondition;只复制一些列到新表中:SELECTcolumn1,column2,column3,...INTOnewtable[INext......
  • CF576
    CF576CodeforcesRound319(Div.1)CF576AlinkCF576A题意给定一个数字\(n\),现在Vasya要从\(1\simn\)中想一个数字\(x\)。Petya向Vasya询问“\(x\)是否能整除\(y\)?”,通过Vasya的回答来判断\(x\)的答案。Petya的问题一开始就已经准备好,他必须将所有问题......
  • mysql c++ create table,insert,select
    CREATETABLE`t1`(`id`bigintunsignedNOTNULLAUTO_INCREMENTprimarykey,`author`varchar(40)NOTNULLDEFAULT'',`comment`varchar(40)NOTNULLDEFAULT'',`content`varchar(40)NOTNULLDEFAULT'',`header`......
  • SQL INSERT INTO 语句详解:插入新记录、多行插入和自增字段
    SQLINSERTINTO语句用于在表中插入新记录。INSERTINTO语法可以以两种方式编写INSERTINTO语句:指定要插入的列名和值:INSERTINTO表名(列1,列2,列3,...)VALUES(值1,值2,值3,...);如果要为表的所有列添加值,则无需在SQL查询中指定列名。但是,请确保值的顺序与表......
  • SQL INSERT INTO 语句详解:插入新记录、多行插入和自增字段
    SQLINSERTINTO语句用于在表中插入新记录。INSERTINTO语法可以以两种方式编写INSERTINTO语句:指定要插入的列名和值:INSERTINTO表名(列1,列2,列3,...)VALUES(值1,值2,值3,...);如果要为表的所有列添加值,则无需在SQL查询中指定列名。但是,请确保值的顺序与表......
  • InsertionSort
     JavaprivatestaticvoidinsertionSort(int[]array){for(inti=1;i<array.length;++i){intindex=i-1,mark=array[i];while(mark<array[index]){array[index+1]=array[index];......
  • 浪潮NF5468A5不识别raid卡处理
    浪潮NF5468A5不识别raid卡,拆掉其他服务器raid卡更换仍不识别,报修后400安排工程师携带GPU板上门排查。上图设备清单中没有看到raid卡,BIOS高级选项中也没有。等待工程师上面时间段,查看BMC及BIOS版本为大概为2021年左右的,先升级下固件看看。NF5468A5_BMC_1.19.04_Standard_20230811.hp......
  • F5负载均衡系列教程三【SSL卸载实验,给定场景判断需要添加哪些profile】
    实验拓扑如下,实验环境搭建参考https://www.cnblogs.com/romin/p/17825779.html实验前提条件:1、拥有类似拓扑一样的实验环境;2、搭建简单的web服务器,比如上图的172.16.128.0、172.16.128.1、172.16.128.2三台服务器可以对外提供http和https服务实验初始配置:1、新建如下的pool......
  • CF570D Tree Requests
    题意给定一棵根为\(1\)的有根树,以及字符串\(S\)。\(x,h\)求\(x\)的子树内,深度为\(h\)的节点的字符能否重排为一个回文串。Sol不难发现,回文串显然至多有一个字符出现奇数个。所以我们对于每种字符随机附权值,维护前缀异或值。查询时枚举\(26\)种为奇数的情况,这是......