Skip to content

Allow Caddy to bind to an interface name (not IP address) #6856

@DanielSidhion

Description

@DanielSidhion

I'm provisioning servers that have an internal interface (to communicate with other servers), and also an external interface. I'm using Caddy as a reverse proxy for external services, but also for an internal service.

To prevent Caddy from binding on all interfaces for the internal service, I'm using a bind <internal ip address> directive, but this is a bit problematic since that interface gets its IP address from DHCP, so there's some friction with manual work involved whenever a new server is provisioned.
This is done as an additional defensive measure, given that there's a firewall preventing external traffic on the internal port.

The name of the interface is always fixed (e.g. enp10s0), so ideally I'd like to be able to bind to an interface name instead, and then I can reuse the same config across servers. I couldn't find an issue for this, has this use case been discussed before, and is this a feature request that makes sense, or do you suggest I solve this in a different way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions