Skip to content

Hostname in server cert doesn't contain internal IP #13922

@rhuss

Description

@rhuss

When I try to contact the docker host from within a container via the its gateway IP obtained via

 host=$(ip route show 0.0.0.0/0 | grep -Eo 'via \S+' | awk '{print $2}');

and using SSL I get this error message

hostname in certificate didn't match: <172.17.42.1> != <127.0.0.1> OR 
<10.0.2.15> OR <192.168.59.103>

I'm not so deep into the docker network stack, but couldn't it be possible to include the internal gateway IPs into the generated server certificate as well ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/securitykind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions