1. 程式人生 > >F5 采用TCP::OPTION 方式做源地址插入

F5 采用TCP::OPTION 方式做源地址插入

F5 源地址插入

關鍵操作
創建profile
1, tmsh create ltm profile tcp options-set tcp-options “{29 last}”
創建irule
2,irule:
when SERVER_CONNECTED {
scan [IP::client_addr] {%d.%d.%d.%d} a b c d
TCP::option set 29 [binary format cccc $a $b $c $d] all
binary scan [binary format cccc $a $b $c $d] H* test
log local5. "insert ip to tcp option 29 $test"
}

字段插入到三次握手後,用戶發起的第一次request method內(抓包看到你們有GET和HEAD方式):
抓包分析用戶用HEAD 方式時:
技術分享圖片

’1d’ – indicates Option-Kind 十進制是29
06 – indicates length of the Option filed in TCP header 十進制是6

‘ 0a 01 0a 01’ – indicates IP (10.1.10.1) in hex-decimal forma 源地址

****8
用GET方式:
技術分享圖片

F5 采用TCP::OPTION 方式做源地址插入