Forum Discussion

Khan_2739's avatar
Khan_2739
Icon for Nimbostratus rankNimbostratus
Sep 30, 2014

HELP in writing the irule

i want to allow IP's only from India and Australia to hit my Virtual IP.

 

All IP's from Australia,

 

but only specific IP's from India.

 

I also want to give access to our LAN users on 172.16.0.0/20 to hit the local Virtual IP 172.16.10.10

 

High appreciated dear experts.

 

Khan

 

3 Replies

  • I have done this rule, but specific all IP from India are getting allowed.

    Irule name: ALLOWED_IPs_INDIA

    when CLIENT_ACCEPTED {

     Get the country client IP
    switch [whereis [IP::client_addr] country] {
        "AUS" -
        "IN" {
            set allowed 0
        }
        default { set allowed 1 }
    }
    

    } when HTTP_REQUEST { if { not ( [class match [IP::client_addr] equals ALLOWED_IPs_INDIA] ) } { reject } }

    Address group: ALLOWED_IPs_INDIA

  • 246631's avatar
    246631
    Icon for Nimbostratus rankNimbostratus

    A virtual information processing address (VIPA) is a virtual IP address allocated to several domain names or servers that share an IP address primarily founded on one network border card (NIC). VIPAs are selected to virtual personal servers, websites or every other request residing on one server.

    Source :- https://www.techopedia.com/definition/2467/virtual-ip-address-vipa

     

    Note from Admin: this message has been edited to remove a spam link, and the user banned.