# Allow access to my VMs only from HAProxy

**URL:** <https://discourse.haproxy.org/t/allow-access-to-my-vms-only-from-haproxy/2777>\
**Category:** Help!\
**Created:** [July 25, 2018, 9:59pm UTC](https://discourse.haproxy.org/t/allow-access-to-my-vms-only-from-haproxy/2777 "2018-07-25T21:59:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alkio](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alkio](https://discourse.haproxy.org/u/alkio)\
**Post date:** [July 25, 2018, 9:59pm UTC](https://discourse.haproxy.org/t/allow-access-to-my-vms-only-from-haproxy/2777/1 "2018-07-25T21:59:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Baptiste](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@Baptiste](https://discourse.haproxy.org/u/Baptiste)\
**Post date:** [July 27, 2018, 7:12am UTC](https://discourse.haproxy.org/t/allow-access-to-my-vms-only-from-haproxy/2777/2 "2018-07-27T07:12:05Z")

</div>

Hi,

You have different ways:

- enable and configure iptables on your servers

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