I am using ssh
client as a SOCKS
server by running on the remote server this command:
ssh -f2qTnND *:1080 some-server-user@localhost
There is only one problem here: anyone can connect to the server and use it's internet connection.
Options:
- To use
iptables
to filter access to the remote server, but clients connect to the server from various non-statically allocatedIP
addresses so filters should be edited very frequently, which is awkward. - To install a
SOCKS
server on the remote server (e.g.Dante
). Ultimately this is the last option if there is no other simpler way to do it. - Launching the command on clients instead of remote server. The problem here is that some clients don't run on
Linux
and it is awkward again to set up the tunnel (e.g.Windows
+Putty
). It is also more difficult for end users to set up their localSOCKS
server (e.g. remembering the command, typing mistakes).
Is there a way to add authentication to a SOCKS
server made using ssh
client?
Bonus question: How to add encryption between the client and the server (made using ssh
client)?