We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 902e74d commit 901ec20Copy full SHA for 901ec20
1 file changed
jail/networking_ns.go
@@ -39,6 +39,11 @@ func SetupChildNetworking(vethNetJail string) error {
39
return nil
40
}
41
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.
47
func ConfigureDNSForLocalStubResolver() error {
48
runner := newCommandRunner([]*command{
49
// Redirect all DNS queries inside the namespace to the host DNS listener.
0 commit comments