Allow access to my VMs only from HAProxy


I have created some machines running a specific application and I use HAProxy to load balance the traffic to these machines.

What are the possible ways to only allow access to my machines from HAPrxoy?

So, every request going directly to the application machines (and not through HAProxy) is going to be rejected.



You have different ways:

  • enable and configure iptables on your servers

  • configure some source IP ACLs on your web server (if it supports it)