Forum Discussion
bezeqint
Dec 05, 2011Nimbostratus
security irule per domain
hello,
i have a server that serves two domains.
lets say that the domain names are DomainA.com and DomainB.com
i want to build a security irule so that:
1. admins from certain IP's or networks will have unlimited access
2. public access to DomainA.com is allowed
3. certain paths (ie /database/) is blocked for public access on DomainA.com
4. public access to DomainB.com is forbidden (admin not included as mentioned in section 1)
thanks,
arnon
- Michael_YatesNimbostratusHi bezeqint,
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "*domaina.com" { if { [match class [IP::client_addr]] equals allowedipaddresses } { return } elseif { [HTTP::uri] contains "/database*" } { HTTP::redirect "/" } } "domainb.com" { if { [match class [IP::client_addr]] equals allowedipaddresses } { return } else { reject } } } }
- bezeqintNimbostratusthanks!
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects