when CLIENT_ACCEPTED {
if { [IP::addr [serverside {IP::remote_addr}] equals 172.20.20.86] } {
log local0.warning "远端IP"
} else {
log local0.warning "不匹配语句"
}
}
13:55 | 192.168.162.254 | errors | tmm tmm[1045]: 01220001:3: TCL error: Rule test_length - Error: No peer connection established IP::remote_addr needs an established peer connection! (line 1) invoked from within "IP::remote_addr" peer expression (line 1) invoked from within "serverside {IP::remote_addr}" |
报错如上
修改:
when SERVER_CONNECTED {
if { [IP::addr [serverside {IP::remote_addr}] equals 10.7.20.240] } {
log local0.warning "远端IP"
} else {
log local0.warning "不匹配语句"
}
}
正常。
说明wiki上那的是有错误,当CLIENT_ACCEPTED事件发生的时候,还没有真正建立完整连接的,这个时候可以认为连接正F5接到,F5正准备处理。
WIKI解释client_accepted
Triggered when a client has established a connection.指的是刚建立一个到F5的连接。
文章评论