Sharing port forwarding within local network

ssh-tunnel

(Yang.Y) #1

For security, other computers in local network are unable to access the port forwarding created on your Mac by default. But sometimes you may want to share the tunnels within trusted network.

In the command line era, you could achieve this with the “ -g ” flag or bind to all interface ( 0.0.0.0 ) explicitly:

ssh -g -D 7070 user@my-ssh-host.com
# or 
ssh -L 0.0.0.0:8080:localhost:8080 user@my-ssh-host.com

While in SSH Tunnel, you can simply set " bind_address " to asterisk mark " ***** ", tells SSH Tunnel bound to all network interfaces of this Mac:

Then all other computers in the same network could use your tunnels through the LAN address or hostname ( Yangs-Macbook.local in my case).

:warning:️ Use this feature carefully, and make sure you are in trusted network.


(Yang.Y) #2

This topic was automatically closed after 60 minutes. New replies are no longer allowed.