-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port forwarding exposes services to the local network #1915
Comments
Hi! I will see what we can do. The default according to ssh manual is to map it to all interfaces. I will see if at least we can do "localhost" only.
|
Note that binding to the LAN IP isn't a way to prevent people to connect from outside the local network, if that's what you mean by security issue. EDIT: oh you want locahost only, not lan, sorry. |
Fixed this and will be out on v17.2.0. I added the GatewayPorts (yes/no) flag, which is also available on clients and it seems to be the flag blocking the port from being forwarded everywhere. It works very well for our case because NWListener on iOS allows to specify the type of interface (not even the specific one or the address). The documentation here is clear. On LocalForward in the manual: But interestingly, on https://www.ssh.com/academy/ssh/tunneling-example, made the same mistake I made: Because we cannot do bind_address, we limit now by interface and GatewayPorts is an all/nothing approach. |
Out on 17.2.0. Closing here. |
Hello! I upgraded to the latest version, but I couldn't find the option for GatewayPorts in the configuration. Should I manually set |
If want to set it as the default for all your hosts, you can define it in the global for .ssh/config:
If you want to use it only for a host on specific tunnels, you can add it to the command. After doing Any of them should do the trick. |
@carloscabanero Thanks for your kind help! |
Checklist
Configuration
Blink v17.1.0.854
iPadOS 17.1.2
Device: iPad Air 5
Describe the bug
The ssh command does not support the full -L argument format.
Currently it is:
port:host:hostport
It should be:
[bind_address:]port:host:hostport
Port forwarding in Blink attaches to all local interfaces, which can be considered a security issue. I created a tunnel to a service on another server, and my iPad exposed that service on my home network. When I went to http://my_ipad_address:forwarded_port on my computer, I saw a forwarded service.
The text was updated successfully, but these errors were encountered: