HAProxy reverse proxy for lan servers with port
-
I have, after some help, managed to get reverse proxy from the internet to work.
My next project is to use HAProxy again, but this time to make ie files.local to point to ip:port on my lan, so I don't have to remember all the different ports.
I point the domain "local" to the pfsense box on the lan in dns.
I set up a new frontend listening to the pfsense local ip and port 80
I made a new backend, pointing files.local to the local ip and port 80. And that works.
But any other port than 80 does not work after configuring the backend with the correct port. The browser just time out. What did I miss?
-
@iSagen
So you have a backend server, which is accessible with say <IP>:81.You have tested the connection from inside.
You have configured a HAproxy backend accordingly and an ACL plus an action to go to this backend in the frontend?Can you provide more details on this, please?
-
-
@iSagen
Note, that a DNS domain override is meant to forward DNS requests for the stated domain to another name server. Hence it is useless if your DNS is hosted on pfSense.
In this case you just need to add host overrides for each. Or if you want to point the whole local domain (*.local) to a single IP (I don't think, this is, what you want, but maybe) you can do this with a 'local-zone' entry in the Resolvers custom options:server: local-zone: "local" redirect local-data: "local IN A 192.168.10.1"
So ensure that the host names are resolved well.
Then how do you access the files.local? Via http?
You have configures a http frontend. This can only treat http requests.And what means "it doesn't work"? What is the error?
-
If I write "piaware.local" in my browser, I am redirected to 192.168.10.36 and there the server is on port 80. So I am served.
If I write "files.local", where the server is at port 30044, nothing happens, it just times out. This server is at 192.168.10.40
-
Any tips on how to get this working?