Dears,
Hoping everything is going well,
i’ve my own site : https://asfourcrystal.com
also have an erp site: https://erpnext.asfourcrystal.com
using WAF rule how can i allow my site to be access through global world.
and just allow access to the ERP only from my country (Egypt) and block access it through the global world?
Thanks,
Ahmed
Hi,
The first solution that comes to my mind is use the following WAF rule expression to only allow Egypt users:
(http.host eq "erpnext.asfourcrystal.com" and ip.geoip.country ne "EG")
And set the action to Block
This basically blocks every request to erpnext.asfourcrystal.com
which the source IP address is not from Egypt
WAF reference: https://developers.cloudflare.com/waf/
Hi kynsonszetau,
many thanks for your help, i’ll try it and feed you back also shall i do make any rule for the main site
https://asfourcrystal.com
?
Thanks,
Ahmed
Hi Ahmed,
You’re welcome. If you would like the main site globally accessible (including Egypt) then I think no WAF rule is needed.
If you wish you can try to redirect Egypt users to the specific site with Redirect Rules. See https://developers.cloudflare.com/rules/url-forwarding/single-redirects/create-dashboard/ for how to configure it. It should be quite similar to the WAF rule expression but without the ne
(not equal) operator.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.