Skip to content

No way to select the UDP listen address #38

Description

@birdie-github

The Slipstream server currently binds its DNS listener to the wildcard IPv4 address (0.0.0.0:53), but there is no option to specify a particular local listen address.

This creates an unnecessary conflict with systemd-resolved and other local DNS services that commonly listen on 127.0.0.53:53.

Steps to reproduce

On a modern Linux system using the default systemd-resolved stub listener, verify:

ss -lunp | grep ':53'

For example:

UNCONN 0 0 127.0.0.53:53 0.0.0.0:* users:(("systemd-resolve",...))

Start Slipstream with its default DNS listen configuration:

slipstream-server \
    --domain=example.com \
    --target-address=127.0.0.1:1080

The server attempts to bind:

0.0.0.0:53

and fails with:

bind(... sin_port=htons(53), sin_addr=inet_addr("0.0.0.0")) = -1 EADDRINUSE

Even though systemd-resolved is only bound to 127.0.0.53:53.

Expected behavior

The server should allow the administrator to specify the local address on which the DNS listener should bind, for example:

--dns-listen-address=1.2.3.4

This would allow:

Slipstream       1.2.3.4:53
systemd-resolved 127.0.0.53:53

to coexist without requiring changes to the system's DNS resolver configuration.

The existing --dns-listen-port option should remain independent of the listen address.

Actual behavior

The server binds to 0.0.0.0:53 and therefore conflicts with a listener on 127.0.0.53:53.

The administrator currently has to modify or disable systemd-resolved, introduce additional socket/proxy configuration, or otherwise work around the wildcard bind.

This is undesirable on Linux servers where systemd-resolved is part of the standard system configuration.

Suggested improvement

Add a command-line option such as:

--dns-listen-address ADDRESS

with the current wildcard behavior retained as the default for backwards compatibility.

At minimum, the option should accept an IPv4/IPv6 address. Supporting an interface name could be considered separately.

Being able to bind only to the intended public/local interface would also provide a useful security and deployment benefit by avoiding unnecessary wildcard exposure.

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