Forum Discussion
Bryce_Halkerst1
Nimbostratus
Mar 18, 2013YourAmigo lookup and forward irule
Having issues with new F5's lookup forwarding YourAmigo.com. Have a ticket opened with F5 and the engineer provided the following solution from DevCentral https://devcentral.f5.com/community/group/as...
nitass
Employee
Mar 19, 2013as Steve mentioned, can you try to include @IP in NAME::lookup instead of using local bind?
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
log local0. "--"
HTTP::collect
HTTP::header replace Host "www.youramigo.com"
NAME::lookup @8.8.8.8 www.youramigo.com
}
when NAME_RESOLVED {
log local0. "--"
node [NAME::response address 0] 80
HTTP::release
}
when HTTP_RESPONSE {
log local0. "--"
log local0. "server [IP::server_addr]:[TCP::server_port] | status [HTTP::status]"
}
}
client
[root@centos251 ~] curl -I http://172.28.19.252/
HTTP/1.1 200 OK
Date: Wed, 20 Mar 2013 04:31:21 GMT
Server: Apache
Last-Modified: Thu, 21 Feb 2013 05:45:08 GMT
ETag: "c419ae-429a-4d63593cae100"
Accept-Ranges: bytes
Content-Length: 17050
Vary: Accept-Encoding
P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"
Content-Type: text/html
/var/log/ltm
[root@ve10:Active] config tail -f /var/log/ltm
Mar 20 12:20:30 local/tmm info tmm[4950]: Rule myrule : --
Mar 20 12:20:30 local/tmm info tmm[4950]: Rule myrule : --
Mar 20 12:20:30 local/tmm info tmm[4950]: Rule myrule : --
Mar 20 12:20:30 local/tmm info tmm[4950]: Rule myrule : serevr 69.36.35.145:80 | status 200
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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