Forum Discussion
N_67263
Aug 28, 2017Nimbostratus
iRule which strips of the domain name and replaces that with another domain name.
Team,
Can anyone help me with an iRule which strips of the domain name and does a DNS query with some other domain name?
e.g. The F5 intercepts a request on "xyz.externaldomain.com". F5 strips of the...
- Aug 28, 2017
Hi,
Maybe the following irule may help you :
when HTTP_REQUEST { if { [HTTP::host] contains "xyz.externaldomain.com" } { HTTP::header replace Host "xyz.internaldomain.com" } }
You may also use
command to make the replacement more dynamicstring map
Stanislas_Piro2
Aug 30, 2017Cumulonimbus
Hi,
You can define which dns server is used for DNS requests.
If you want to manage DNS servers, create a LTM pool including dns servers with dns monitor and use this irule. the dns pool name in this irule is
p_dns
when CLIENT_ACCEPTED {
foreach dns [active_members -list p_dns] {
Check if the first list element was empty
if {[set dest [lindex [RESOLV::lookup @[lindex $dns 0] -a "www.abc.com";] 0]] ne ""} {
Set Node IP based on DNS resolution
node $dest 443
break
}
}
}
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