Forum Discussion
GeoIP Irule - what to do
hello together,
we have an virtual server with his irule. Now we only want to allow access to this pool / server from poland and germany.
1) how can i solve this ? 2) the irule:
when HTTP_REQUEST { set lowerURI [string tolower [HTTP::uri]] switch [HTTP::host] { "www.xxxx.com" { 'a lot of if / elseif questions if starts with -> use pool etc) ' and the last else: else { pool www_xxxx_com_80 if {$debug}{log local0. "WEB: Client: [IP::client_addr]:[TCP::client_port] LB to: [LB::server addr]"} return} } } }
Could someone help me ? And did i have to configure something before on our BigIP to get GEO IP Filter to run ?
We have an 5200 with BIG-IP 11.5.1 Build 3.0.131 Hotfix HF3
- Dormelchen_2406Nimbostratus
maybe this ?
when CLIENT_ACCEPTED { if {not ([whereis [IP::client_addr] country] eq "DE" or "PL")}{ reject } } when HTTP_REQUEST { set lowerURI [string tolower [HTTP::uri]] switch [HTTP::host] { "www.xxxx.com" {
?
- IheartF5_45022Nacreous
I don't think 'if' will work like that but you have the right idea about using CLIENT_ACCEPTED. Try - this - 'if' would work too, but I just like 'switch';-
when CLIENT_ACCEPTED { switch [whereis [IP::client_addr] country] { "DE" - "PL" { Allowed countries - do nothing } default { reject } } }
- Dormelchen_2406Nimbostratus
is there any possibility to add an FQDN to the rule ?
like DE and PL are allowed AND for example FQDN www.google.de ?
thanks
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