Forum Discussion
msmith_64485
Nimbostratus
Jan 25, 2010IP to FQDN
Looking for an irule that will replace the IP address of outgoing traffic with the FQDN. Issue is external server does not have a valid PTR record to allow resolution. Owner of this server does not ...
msmith_64485
Nimbostratus
Jan 29, 2010Aaron,
Yea looks simular execpt When using ip the page can not be found when using fqdn it connects. The connection issue is between the ltm and pool member, not between requesting server and ltm.
Jan 29 09:09:18 tmm tmm[1616]: Rule Test_Log : 192.168.1.205:2112: GET request to 2.2.2.2:1234/example.svc?wsdl
Jan 29 09:09:18 tmm tmm[1616]: Rule Test_Log : 192.168.1.205:2112: Connected to 1.1.1.1:443
Jan 29 09:09:23 tmm tmm[1616]: Rule Test_Log : 192.168.1.205:2113: GET request to 2.2.2.2:1234/example.svc?wsdl
Jan 29 09:09:23 tmm tmm[1616]: Rule Test_Log : 192.168.1.205:2113: Connected to 1.1.1.1:443
Jan 29 09:09:26 tmm tmm[1616]: Rule Test_Log : 192.168.1.205:2114: GET request to 2.2.2.2:1234/example.svc?wsdl
Jan 29 09:09:26 tmm tmm[1616]: Rule Test_Log : 192.168.1.205:2114: Connected to 1.1.1.1:443
2.2.2.2 is ltm vip
1.1.1.1 is pool node member (where traffic needs to go)
1.1.1.1 needs to be server1.example.com as it leaves the ltm to the remote server
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [HTTP::host][HTTP::uri]"
Check if Host header matches 2.2.2.2
Use catch to handle non-IP Host values.
If IP::addr matches 2.2.2.2, $result will be 1
if {not ([catch {IP::addr [HTTP::host] equals 2.2.2.2} result]) && $result==1}{
log local0. "[IP::client_addr]:[TCP::client_port]: Matched IP check for 2.2.2.2 Replacing host header"
HTTP::header replace Host "server1.example.com"
}
}
when SERVER_CONNECTED {
log local0. "[IP::client_addr]:[TCP::client_port]: Connected to [IP::server_addr]:[TCP::server_port]"
}
This is the current rule based on your last recommended configuration
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