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.
- To use
iptablesto filter access to the remote server, but clients connect to the server from various non-statically allocated
IPaddresses 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.
Putty). It is also more difficult for end users to set up their local
SOCKSserver (e.g. remembering the command, typing mistakes).
Is there a way to add authentication to a
SOCKS server made using
Bonus question: How to add encryption between the client and the server (made using