haproxy to deny access based on url and ip addresses -


i'm running haproxy 1.6.8 , want restrict access web's admin login whitelist of ip addresses. can't figure out how properly.

frontend main mode http bind 0.0.0.0:80 acl admin_page path_beg,url_dec -i /admincp acl whitelist src 10.0.0.0/8 

my intention use:

http-request deny admin_page unless whitelist 

but haproxy check complaints incorrect , can't this.

what's thought?

acl admin_page path_beg,url_dec -i /admincp 

this might (?) valid, if is... don't it. there magic taste, passing *_beg through converter. following feels better, safer solution part.

acl admin_page path,url_dec -m beg -i /admincp 

take path fetch, run through url_dec (url-unescape) converter, case-insensitive -i match of pattern against beginning -m beg of resulting string.

then, need correct syntax , logic apply it.

http-request deny if admin_page !whitelist 

the "and" between 2 acls implicit, , second negated, deny request if request matches admin_page acl , not whitelist acl.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -