Skip to content

[Feature] Support multiple/more specific bind addresses in listen_addr #3052

@leegenthmi

Description

@leegenthmi

Use case

Allow dual-stack/multi-IP address server deployment on machines with multiple IP addresses where some of those addresses already have port 443 bound (without the use of a reverse proxy).

Description

Hello, I have a machine with one single public IPv4 address and many public/global IPv6 addreses. I have various other services listening on the various IPv6 addresses on ports 443.

I would like to bind Headscale to one single specific (well, the only) IPv4 address and one single specific IPv6 address. Currently we can use 0.0.0.0:443 which binds to all addresses (and therefore fails because 443 is in use on some irrelevant IPv6 address) or [x:y:z::]:443 which binds to a specific IPv6 address but no IPv4 address. listen_addr: may not be defined multiple times with differing values.

Allowing the software to be able to parse an array of listen-addr:s would enable easier deployment on multi-IP hosts.

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

Modify the config file parser to allow an array of listen_addrs to be to specified and bind to each in turn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions