Skip to content

Commit 901ec20

Browse files
improve docs
1 parent 902e74d commit 901ec20

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

jail/networking_ns.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ func SetupChildNetworking(vethNetJail string) error {
3939
return nil
4040
}
4141

42+
// ConfigureDNSForLocalStubResolver configures DNS redirection from the network namespace
43+
// to the host's local stub resolver. This function should only be called when the host
44+
// 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.
4247
func ConfigureDNSForLocalStubResolver() error {
4348
runner := newCommandRunner([]*command{
4449
// Redirect all DNS queries inside the namespace to the host DNS listener.

0 commit comments

Comments
 (0)