From c7c8b011220a6eddf0ea7bc8b31b48c5eb2d2a8d Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Fri, 23 Aug 2019 11:49:24 -0400 Subject: [PATCH] agent: -dev=connect mode bind to 0.0.0.0 The dev mode flag for connect was binding to the default interface's IP, but this makes for a bad user experience for the CLI which will default to 127.0.0.1. If we bind to 0.0.0.0 instead the CLI will work without further configuration by the user. --- command/agent/config.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/command/agent/config.go b/command/agent/config.go index 969ecd447..a20912e38 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -740,12 +740,8 @@ func (mode *devModeConfig) networkConfig() error { return fmt.Errorf(errMsg, "could not find public network inteface") } iface := ifAddrs[0].Name - addr, err := sockaddr.GetInterfaceIP(iface) - if err != nil { - return fmt.Errorf(errMsg, "could not find address for public interface") - } mode.iface = iface - mode.bindAddr = addr + mode.bindAddr = "0.0.0.0" // allows CLI to "just work" return nil } mode.bindAddr = "127.0.0.1"