Forum Discussion
How to check if an iRule is active
PLEASE HELP. I am trying to apply an iRule to a virtual server. So I am using the below code for testing if the iRule is active. All the below code suppose to do is to redirect all traffic to google. However, nothing seems to happen. I am not even sure if the iRule is called. I can see the iRule via the network map under the virtual server (the circle next to it is white though, should it be?).
when HTTP_REQUEST {
HTTP::redirect "http:://www.google.com"
}
21 Replies
- Linda_01_162621
Nimbostratus
PLEASE HELP. I am trying to apply an iRule to a virtual server. So I am using the below code for testing if the iRule is active. All the below code suppose to do is to redirect all traffic to google. However, nothing seems to happen. I am not even sure if the iRule is called. I can see the iRule via the network map under the virtual server (the circle next to it is white though, should it be?). when HTTP_REQUEST { HTTP::redirect "http://www.google.com" } - What_Lies_Bene1
Cirrostratus
Does the Virtual Server have a HTTP profile assigned? An iRule HTTP event work trigger without one.
- Linda_01_162621
Nimbostratus
Yes, I am using the default http profile.
- Michael_Jenkins
Cirrostratus
Is your virtual server using https or http? If https, are you offloading the SSL at the F5? If not, I don't think you'll be able to do anything with the request.
- Linda_01_162621
Nimbostratus
These are parameters I used and the rest I left the defaults.
Type: Performance (Layer 4)
Source address: 0.0.0.0/0 Destination Address: 0.0.0.0 All ports
Protocol: ALL protocols Protocol Profile (Client): fastL4 HTTP Profile: http
disabled address and port translation using a default pool
I am not sure what you mean about the offloading the SSL at the F5
- Michael_Jenkins
Cirrostratus
If you were using port 443 (https), you would need to specify a clientssl profile Does it work if you use tcp for protocol profile (client)?
- Linda_01_162621
Nimbostratus
It turns that I am using TCP protocol profile instead and if I try and use ALL protocols, it doesn't allow the http profile to be selected (none).
Ver 11.0.6
- Michael_Jenkins
Cirrostratus
Is your destination address actually
or is that just replacing the actual ip?0.0.0.0If you change your config to
- Protocol:
TCP - Protocol Profile (Client):
tcp - HTTP Profile:
http
and then look at the statistics tab in the config UI for that virtual server... if you open the web site (the VIP) and refresh the statistics, do those stats change as you would expect?
- Protocol:
- Linda_01_162621
Nimbostratus
Yes my destination IP is 0.0.0.0 and I only have one profile on the dropdown of protocol profile (for the performance (Layer 4)VS), it is the fastL4.
Is there some module that I need to provision or some configuration that I missed.
i will check the statistics as you suggested. Thanks
- Michael_Jenkins
Cirrostratus
I may be wrong (not really a networking guy), but I don't think you can access a vip at 0.0.0.0. You probably can't ping it can you? Can you update the destination vip to something different (like other vips you may have) and try that?
- Linda_01_162621
Nimbostratus
Yes you are right, I can't ping that.
This VS listens to my internal VLAN traffic, I guess I can use the network ID of this VLAN as source for the VS. However, I can't specify a particular destination IP,I have more than ONE ISP router from different networks configured, that are LB by this VS.
- THi
Nimbostratus
If you are using FastL4 (as you have to, if you have the 0.0.0.0 wildcard IP forwarding virtual server), I think it does not allow L7 processing, and in your iRule the HTTP_REQUEST event is Layer7 processing.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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