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
iptablesto filter access to the remote server, but clients connect to the server from various non-statically allocatedIPaddresses so filters should be edited very frequently, which is awkward. - To install a
SOCKSserver 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
Linuxand 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 localSOCKSserver (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)?
dante-server... and then realized that a lot of clients don't support authentication :( I think I will ultimately go with a VPN solution. – Aalex Gabi Oct 14 '12 at 3:33