mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-20 15:26:04 +08:00
fixed ssh port forwarding
This commit is contained in:
parent
ca1c69264c
commit
4dc9f74ae4
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue