Forum Discussion

Fadhil_Marus__T's avatar
Icon for Nimbostratus rankNimbostratus
Dec 09, 2010

landing page

Good day all,

I'm going to create iRule for "landing page", so client when accessing to the network, get the IP address and def gw, and accessing a web page, the F5 will redirect the first attempt to a landing page (F5 as default gateway for client). so when client open browser at the first time (or connect at the first time), for example:, F5 will redirect to After that when user tries again to open or other, F5 will not redirect to the landing page, and the real page displayed ( or other).

We tried to use this irule (based on table wiki):

    set tbl "connlimit:[IP::client_addr]"
    if { [table keys -subtable $tbl -count] < 1 } {
        log local0. "LANDING $tbl [table keys -subtable $tbl -count]"
        table set -subtable $tbl "landing" "ignored" 180
        HTTP::respond 302 Location ""
        log local0. "LANDING $tbl [table keys -subtable $tbl -count]"
        event CLIENT_CLOSED disable
    } else {
    table set -subtable $tbl "landing" "ignored" 180
    set timer [after 1000 -periodic { table lookup -subtable $tbl "landing" }]    
    log local0. "LANDING2 $tbl [table keys -subtable $tbl -count]"
    after cancel $timer
    log -noname local0. "CLOSED $tbl [table keys -subtable $tbl -count]"
    table delete -subtable $tbl "landing"

But still there is some miss redirection. after first attempt, the second attempt and random attempt still redirect to the landing page.

Is there any good iRule for this?

Thanks and best regards,


1 Reply

  • Hi Fadhil,



    Is this only for HTTP or decrypted HTTPS traffic? If so, can you use cookie insert persistence and then just redirect clients who don't have a persistence cookie to your notice URL? Or you could insert your own session cookie in the iRule. That would probably be more effective and efficient than storing client IP addresses in LTM's session table.