ubuntu - HAProxy restrict single backend by ip range -
I have received an Haprosic setup with about twenty backend definitions (and some more) in the config file. I have been asked to restrict any backend in a specific IP range, but so far my research (and limited Heprosy knowledge) has not generated anything.
While reading, I would have found a network matching parameter, but I do not have any front end definition and I do not want to apply this restriction on any other proxy routes. Can I use the IP range to restrict access specifically to a backend?
Thank you, Simon
For a functional HAProxy setup, 'Listen' instructions will be required. These are the only instructions that will answer the incoming requests. The 'backend' instruction provides a way to route traffic only behind the proxy.
It is being said that, here is an entry to fulfill your goals that you need in the 'frontend' or 'listen' instruction: / P>
acl white_list src 192.168.1.0/24 192.168.10.0/24 TCP-request content accept if white_list rejects TCP-requested content
These instructions are only traffic 192.168.1 / 24 and 192 Coming from .168.10 / 24 subnet.
Comments
Post a Comment