Forum Discussion
Scott_82463
May 24, 2011Nimbostratus
Simple "Hello World" iRule
I'm really new to F5 and iRules and I'm having trouble setting up a simple "Hello World" iRule. Here's the iRule I tried: when HTTP_REQUEST { if { [HTTP::uri] eq ...
hooleylist
May 25, 2011Cirrostratus
Hi Scott,
How are you making the HTTP request? Can you try this iRule:
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: Connected to [virtual name] [IP::local_addr]:[TCP::local_port]"
HTTP::respond 200 content "Connected to [virtual name] [IP::local_addr]:[TCP::local_port] from [IP::client_addr]:[TCP::client_port]"
}
Then start with a curl request on the LTM command line:
curl -v http://1.1.1.1
where 1.1.1.1 is the virtual server address. If that works, then try from a browser. If the curl command works but you don't see a response from the iRule in a browser, then it's likely the request isn't making it to LTM.
Aaron
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