PiBa-NL / pfsense-haproxy-package-doc

55 stars 15 forks source link

Port range in frontend #13

Closed mathieuchateau closed 3 years ago

mathieuchateau commented 3 years ago

Hello,

I can't figure how to configure a port range in haproxy. Version: Pfsense 2.4.5 haproxy 1.8.25 package 0.60_6

When I try to set a port range instead of 1 port on Frontend, I have this error message: The external address field 'Port' value '30000-40000' is not a number or alias thereof. I also try with syntax 30000:40000

I can set nothing, so I guess it will take all ports, but that's bad. Looks like using port range is possible from a long time in haproxy.

This is to set up an FTP service with nodes.

Thanks in avance for your help

PiBa-NL commented 3 years ago

Did you read the message and try what it implies? "or alias thereof."

You can create a firewall/alias: image And then use that in haproxy: image Which it will then bind to: image

mathieuchateau commented 3 years ago

Hello,

Thanks for helping. I did see it, but thought it was for well known port, like smtp instead of port 25. I thought it could also be what you show, but it looked too far stretched. Great it works using Pfsense alias port. Maybe just enhance the sentence to more explicit, like "Pfsence port alias" ?

PiBa-NL commented 3 years ago

I guess reading the sentence again it indeed seems to say that you could perhaps write 'smtp' as a alias for the port '25' for a single port.. And does not so much refer to 'pfSense port aliases' or portranges specifically.. Ill try and remember to change that text a little with a next update.. :) Or perhaps even allow manually putting in port ranges..