Skip to content

Commit 1a26239

Browse files
improve docs
1 parent 901ec20 commit 1a26239

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

jail/networking_ns.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ func SetupChildNetworking(vethNetJail string) error {
4242
// ConfigureDNSForLocalStubResolver configures DNS redirection from the network namespace
4343
// to the host's local stub resolver. This function should only be called when the host
4444
// runs a local stub resolver such as systemd-resolved, and /etc/resolv.conf contains
45-
// "nameserver 127.0.0.53" (listening on localhost). It redirects DNS requests from
46-
// the namespace to the host by setting up iptables NAT rules.
45+
// "nameserver 127.0.0.53" (listening on localhost). It redirects DNS requests from the
46+
// namespace to the host by setting up iptables NAT rules. Additionally, /etc/systemd/resolved.conf
47+
// should be configured with DNSStubListener=yes and DNSStubListenerExtra=192.168.100.1:53
48+
// to listen on the additional server address.
4749
func ConfigureDNSForLocalStubResolver() error {
4850
runner := newCommandRunner([]*command{
4951
// Redirect all DNS queries inside the namespace to the host DNS listener.

0 commit comments

Comments
 (0)