mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-09 10:41:07 +08:00
fixed ssh port forwarding
This commit is contained in:
@@ -50,11 +50,13 @@ func portForwardServices() error {
|
|||||||
case "dns":
|
case "dns":
|
||||||
err = iptablesPortForward("coredns", "53", "53", false)
|
err = iptablesPortForward("coredns", "53", "53", false)
|
||||||
case "ssh":
|
case "ssh":
|
||||||
err = iptablesPortForward("127.0.0.1", "22", "22", true)
|
err = iptablesPortForward("netmaker", "22", "22", false)
|
||||||
default:
|
default:
|
||||||
params := strings.Split(service, ":")
|
params := strings.Split(service, ":")
|
||||||
|
if len(params) == 3 {
|
||||||
err = iptablesPortForward(params[0], params[1], params[2], true)
|
err = iptablesPortForward(params[0], params[1], params[2], true)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user