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 ...
Moe_Jartin
Cirrus
Jan 25, 2010If by "outgoing: you mean response traffic then you would need to use HTTP::header replace Location "www.example.com" is hoolio's example as responses do not have a Host header. Also, if the IP address is embedded in the page you would need to use a stream profile to rewrite it. Since there seems to be only one host in question here a simple stream profile with the IP address in the Source field and the FQDN in the Target field should get it done. If there are multiple hosts in questions then you could do this with am irule:
when HTTP_RESPONSE {
Replace IP Addresses from HTTP responses
if { [HTTP::header value "Content-Type"] contains "text"} {
STREAM::expression "@1.1.1.1@host1.mysite.com@ @1.1.1.2@host2.mysite.com@ @1.1.1.3@host3.mysite.com@"
STREAM::enable
} else {
STREAM::disable
}
}
HTH,
Joe
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