-
Notifications
You must be signed in to change notification settings - Fork 682
Remove open ports requirements by forwarding them via SSH #93
Comments
Related to #86. |
👍 This would simplify remote connections (as you wouldn't need to manually forward additional ports if you have an especially hardened SSH configuration). It would also add peace of mind. I just manually logged I'm not a security engineer, so I don't feel confident auditing |
I didn't want to open port 9090 either. Found if I use localhost in nuclide server connection instead of actual remote IP, then SSH port forward 9090 it works perfectly. So lets say my remote server is at On that remote server, I have a nodejs app running on port 3000. On my macbook run
Now in
So SSHing to localhost:20022 actually SSHs into server.example.com:22 and localhost:9090 is forwarded over to the server along with 3000. Now |
I'd like to add a note to @mreschke's helpful comment. His setup seems to assume port 9090 is blocked (by iptables or a firewall or something). That isn't the case for me, and I don't have admin access to the host. But I was able to make the server listen only on localhost by making this change:
Another note other folks without admin access to the ssh server. I installed node, watchman, and nuclide-server in my home directory, and I had to add this line to the beginning of nuclide-start-server to make it work (adjust for your installation):
It would be nice if nuclide made these things stuff easier. :) |
Would it be possible to get more info about how the authentication works? I read the big-dig README, but I've fiddled for the last day or two with trying to get useful debug info out for how to get it to work with forwarding ports, without much success unfortunately. I got it successfully starting the server using ssh-agent and forwarding a local port to 22 on the remote machine, then connecting to 127.0.0.1:8022 as suggested by #332. I went down this rabbit hole because of issues, which I think are related to #282 and #694. Will the bootstrapping of the server and client connection work the same way for the VS Code server? I'd happily settle for a manual bootstrap, that required setting some long timeouts, and manually scp'ing the I'd be keen to provide any other info that could be useful, since I'd love to find a solution for this. |
An SSH connection is already required for nuclide-server to work so it might be a good idea to just forward the necessary ports through it instead of having to open them on firewalls.
If the local client port is dynamically assigned in the local_port_range it won't cause any conflicts over multiple remote connections.
This would also allow for a simpler approach to encryption as it wouldn't require to setup dedicated certificates on the server.
Thanks!
The text was updated successfully, but these errors were encountered: