Pfsense haprox as a webhosting local services

Hi everyone,

I have in my home (spectrum), behind my firewall i have my local network with a http server (, backend api server(

I ionos i have my website and dns configuration ponting to my spectrum ip.

When i try to acess my website it work perfect but for exemplo if i try to make a login does not work.

The login process it is on backend api.

If i insert in my dns (ionos) the public ip with a subdomian and make on my pfsense a nat with redirection to my local ip and port 3600 everything work perfect.

Obs. The name of subdomain it is the some as my backend hostname.

The problem it is have to expolse every service i have with subdomain to work.

It is possible to make this configuration without expolse my local service? Please help me, how can i do that?


If I understand correctly your server setup is in 2 parts. HTTP on one server and API on another?
I had a similar issue while hosting something like this. The problem is that when you are coming inbound to the proxy, the proxy it is unaware of how to reach your API locally unless it is also exposed along side the HTTP service in HAproxy.

Hi, thanks
I’ve tried everything.
Do you mean like this?

Another image

That looks right. So long as your http app knows to reach the API at that subdomain and port.

thanks, I think I’m doing something wrong.

If i remove that 3600 service from haproxy, put firewall nat redirect to host and port 3600 and include my host on my provider (ionos) everything work perfect.
Exemplo: my domain is, my http server call backend server.

If i go on ionos and include subdomain ‘auth’. On DNS records show TYPE A with ‘auth’ and my public ip, after that everthing work.

Hi everyone, this problem only happens outside my local network