Browse Source

Merge pull request #820 from gravitl/bugfix_v0.11_forwarding

fixed ssh port forwarding
Alex Feiszli 3 years ago
parent
commit
e9f5cd2bcc
1 changed files with 4 additions and 2 deletions
  1. 4 2
      serverctl/iptables.go

+ 4 - 2
serverctl/iptables.go

@@ -50,10 +50,12 @@ func portForwardServices() error {
 		case "dns":
 			err = iptablesPortForward("coredns", "53", "53", false)
 		case "ssh":
-			err = iptablesPortForward("127.0.0.1", "22", "22", true)
+			err = iptablesPortForward("netmaker", "22", "22", false)
 		default:
 			params := strings.Split(service, ":")
-			err = iptablesPortForward(params[0], params[1], params[2], true)
+			if len(params) == 3 {
+				err = iptablesPortForward(params[0], params[1], params[2], true)
+			}
 		}
 		if err != nil {
 			return err