Skip to content

Wireguard conf is incorrect if Endpoint IP_subject_alt_name is an IPv6 Address #14750

Open
@adfernandes

Description

@adfernandes

If an IPv6 address is used a wireguard endpoint IP_subject_alt_name address, the configuration template file will generate a bad conf file.

Specifically, the template will generate something like this:

...
AllowedIPs = 0.0.0.0/0,::/0
Endpoint = 2600:3c01::f03c:91ff:fedf:3b2a:51820

To be correct, the IPv6 address needs square brackets around it, like this:

...
AllowedIPs = 0.0.0.0/0,::/0
Endpoint = [2600:3c01::f03c:91ff:fedf:3b2a]:51820

So different templates are needed for IPv6 and IPv4/DNS-name endpoint addresses.

If someone can point out the right way to do that with ansible/jinja, I'd be happy to make and test a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions