Forum Discussion
irule allow only one IP to VIP
Hi guys I need to allow only one ip to vip and will this help ?
when CLIENT_ACCEPTED {
if { ( [IP::addr [IP::client_addr] equals "11.22.33.44"] )
} then {
Allow
} else {
DROP
reject
}
}
Ok I had to go with data group
when CLIENT_ACCEPTED { Check the data group if { ! ([class match [IP::client_addr] equals allow_2_IP ]) } { Not valid client drop }
}
works fine but if someone have irule which allow only 2 ips it would be great also 🙂
Should work. You can use drop instead of reject if you don't need to inform the client and just drop silently.
Or this:
when CLIENT_ACCEPTED { if { !( [IP::addr [IP::client_addr] equals "11.22.33.44"] ) } { reject } }
- DevBabuCirrus
Or this without iRule:
From GUI:
Local Traffic ›› Virtual Servers : Virtual Server List >> my_virtual_server
source : 11.22.33.44/32
- slesh_219299Cirrus
Ok I had to go with data group
when CLIENT_ACCEPTED { Check the data group if { ! ([class match [IP::client_addr] equals allow_2_IP ]) } { Not valid client drop }
}
works fine but if someone have irule which allow only 2 ips it would be great also 🙂
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