Forum Discussion
Dan_Deming_1935
Nimbostratus
Aug 18, 2006How do I insert LB's IP with an irule?
We have 2 F5 Big IP units set up in front of 3 web servers running Apache 1.3. We're using the Type: Standard, Protocol: TCP and HTTP Profile: HTTP settings.
In our Apache logs, we want to include...
Dan_Deming_1935
Nimbostratus
Aug 18, 2006I still can't get the Big IP's IP address to be passed on.
I can get 3 of the 4 IP's involved: client's IP, Server Internal IP and Server External IP, but no matter what I try, I can't for the life of me get the Big IP's IP.
The only time I've ever managed to get it was when we were using the Performance profile, which we found gave an inaccuarate value for REMOTE_ADDR. But in the normal HTTP setting nothing I try will let me see this value. Here's the variation on Joe's code which I've tried, which returns the same 3 IPs but not the one I need:
when HTTP_REQUEST {
set bigip_addr1 [IP::local_addr]
set bigip_addr2 [IP::remote_addr]
set bigip_addr3 [IP::client_addr]
}
when HTTP_REQUEST_SEND {
set serverip_addr1 [IP::server_addr]
set remoteip_addr2 [IP::remote_addr]
set clientip_addr3 [IP::client_addr]
clientside {
HTTP::header insert "Client-Addr" [IP::client_addr]
HTTP::header insert "Server-Addr" [IP::server_addr]
HTTP::header insert "Node-Addr" [IP::remote_addr]
HTTP::header insert "Local-Addr" [IP::local_addr]
HTTP::header insert "BIGIP-Server-Addr" $serverip_addr1
HTTP::header insert "BIGIP-Remote-Addr" $remoteip_addr2
HTTP::header insert "BIGIP-client-Addr" $clientip_addr3
HTTP::header insert "BIGIP1" $bigip_addr1
HTTP::header insert "BIGIP2" $bigip_addr2
HTTP::header insert "BIGIP3" $bigip_addr3
}
}
Any other suggestions?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
