:::: MENU ::::

Restrict access by IP on specific page with HAProxy

  • Jun 19 / 2015
  • 0
Linux

Restrict access by IP on specific page with HAProxy

Most of time, we are setting only one (or some) IP to be allowed to access to some pages or services. But it can also be necessary sometimes to restrict access of an URL only for one IP (if you are getting some attacks from a hacker for example on some webservice).

You can do that restriction much easily with HaProxy with the following rules:

  • IPADDR: it will be the IP address you want to restrict access
  • REGEX: a regular expression matching the pages you want to restrict (for example: /mypage/v[1-9]{1}/webservice)

Find the full and official documentation (especially on ACL) here: http://cbonte.github.io/haproxy-dconv/configuration-1.6.html#7

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone

Comments are closed.

Question ? Contact