Skip to content

[Request]: DNS server should allow listening outside of localhost #1302

Description

@panaut0lordv

Feature or enhancement request details

For the usecases where we'd like to autodiscover containers' IPs using built-in DNS server we should be able to reach it from outside of the host.
Currently however this is hardcoded in https://github.com/apple/container/blob/main/Sources/Helpers/APIServer/APIServer%2BStart.swift to:
static let listenAddress = "127.0.0.1"
We then see two DNS servers, 1053 and 2053, both of which listen on 127.0.0.1

There seems to be a switch during DNS domain creation, which does the magic of being able to resolve on specified IP locally:

sudo container system dns create --localhost 192.168.1.64 container-dns
nslookup -port=2053 example.container-dns 192.168.1.64
Server:         192.168.1.64
Address:        192.168.1.64#2053

Name:   example.container-dns
Address: 192.168.65.13

But doesn't work from another machine, actually it is even worse as that BLOCKS incoming SSH/screen sharing connections? Probably misunderstanding what the option is for.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions