# Using API when HAProxy is an extension of PFSense

**URL:** <https://discourse.haproxy.org/t/using-api-when-haproxy-is-an-extension-of-pfsense/12166>\
**Category:** Help!\
**Created:** [May 4, 2026, 12:01pm UTC](https://discourse.haproxy.org/t/using-api-when-haproxy-is-an-extension-of-pfsense/12166 "2026-05-04T12:01:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrazyMasterMC](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@CrazyMasterMC](https://discourse.haproxy.org/u/CrazyMasterMC)\
**Post date:** [May 4, 2026, 12:01pm UTC](https://discourse.haproxy.org/t/using-api-when-haproxy-is-an-extension-of-pfsense/12166/1 "2026-05-04T12:01:39Z")

</div>

Hello,

I am running HAProxy as a pfSense package for multi-tenant routing (one subdomain per backend, all behind a single 80/443 entry point).

I would like to automate the creation of frontend and backend rules. Is there an API available to modify HAProxy frontend/backend rules when HAProxy is running inside pfSense?

I created a dedicated pfSense user but did not find any privilege related to HAProxy operations.

Thanks.

---

<div class="post-metadata">

**Author:** ![ema-pe](https://avatars.discourse-cdn.com/v4/letter/e/7c8e57/32.png) [@ema-pe](https://discourse.haproxy.org/u/ema-pe)\
**Post date:** [May 4, 2026, 1:41pm UTC](https://discourse.haproxy.org/t/using-api-when-haproxy-is-an-extension-of-pfsense/12166/2 "2026-05-04T13:41:22Z")

</div>

Hi, you could use the [Runtime API](https://www.haproxy.com/documentation/haproxy-runtime-api/) via the Data Plane API, or connect to it directly via a UNIX or TCP socket. As I understand, the pre-built pfSense package does not include the Data Plane API by default, so you could try enabling the Runtime API in the HAProxy configuration and connecting to it.

---

<div class="post-metadata">

**Author:** ![CrazyMasterMC](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@CrazyMasterMC](https://discourse.haproxy.org/u/CrazyMasterMC)\
**Post date:** [May 5, 2026, 2:05pm UTC](https://discourse.haproxy.org/t/using-api-when-haproxy-is-an-extension-of-pfsense/12166/3 "2026-05-05T14:05:38Z")

</div>

Hi,  
Thanks for your participation 🙂  
Ha proxy is already deployed in my pfsense.  
I found !

 ![image](https://us1.discourse-cdn.com/flex016/uploads/haproxy/original/2X/b/b901087ced4dc09221be9a896c6b46fec083e62d.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/haproxy/original/2X/e/e22f426c0a93401c9afa210ccd8730e6577ac666.png)

I hope it will work 🙂

---

<div class="post-metadata">

**Author:** ![ema-pe](https://avatars.discourse-cdn.com/v4/letter/e/7c8e57/32.png) [@ema-pe](https://discourse.haproxy.org/u/ema-pe)\
**Post date:** [May 5, 2026, 4:53pm UTC](https://discourse.haproxy.org/t/using-api-when-haproxy-is-an-extension-of-pfsense/12166/4 "2026-05-05T16:53:17Z")

</div>

I do not know pfSense, but there should be a way to update the HAProxy configuration. Maybe it would be better to ask on the pfSense support forum, since the problem seems to be related to pfSense rather than HAProxy.

---

<div class="post-metadata">

**Author:** ![CrazyMasterMC](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@CrazyMasterMC](https://discourse.haproxy.org/u/CrazyMasterMC)\
**Post date:** [May 5, 2026, 6:27pm UTC](https://discourse.haproxy.org/t/using-api-when-haproxy-is-an-extension-of-pfsense/12166/5 "2026-05-05T18:27:03Z")

</div>

Okay  
First I installed pfSense and I discovered a new world…  
When I added the HAProxy extension, I didn’t know it could be a stand alone product.  
I have no time now to do that now but I know it’s better to totally separate technologies if it’s possible.  
I created an api layer for pfsense to use haproxy…  
Thanks for your help
