Forum Discussion

Mad_Uni_220626's avatar
Mad_Uni_220626
Icon for Nimbostratus rankNimbostratus
Feb 09, 2018

How to route public IP addresses to a different pool?

We've got a Big-IP LTM that I setup to load balance application traffic to a pool of servers. This application is getting traffic from public IP ranges and private IP ranges. When we make changes to the app, we like to send public IP addresses to a maintenance page while allowing our private IP addresses to continue hitting the normal virtual server pool. What is the easiest way to do this with the F5? So far we have simply been pointing our external DNS to a different IP address altogether which allows our internal DNS to continue as-is. I tried looking into doing this with an iRule script, however, I have no experience with iRules.

 

Thanks!

 

  • DNS change is a good approach. However, if users have VIP address, DNS change may not work as expected. You may use iRule like this. Syntax has not been checked.

     

    Code
    create datagroup allowedIntenalhosts with allowed internal IP addresses

    when HTTP_REQUEST {

     

    if { [class match [IP::client_addr] equals "allowedIntenalhosts"} {

     

    business as usual

     

    } else { send sorry page or may redirect HTTP::respond 403 content "sorry, this service is currently under maintenance" } }