Extract from man ssh
:
-D [bind_address:]port
This means you’ll have to specify which address the virtual SOCKS proxy should bind to. If you want it to be available on every interface on your computer, use *
.
The default behavior is controlled in ssh_config
(or appropriate more local overrides) with the option GatewayPorts
:
Specifies whether remote hosts are allowed to connect to local forwarded ports. By default, ssh(1) binds local port forwardings to the loopback address. This prevents other remote hosts from connecting to forwarded ports. GatewayPorts can be used to specify that ssh should bind local port forwardings to the wildcard address, thus allowing remote hosts to connect to forwarded ports. The argument must be “yes” or “no”. The default is “no”.