I have an arch linux machine behind a firewall. I can open a port forwarding for the ssh port. I would like to create a user that can be used only for a socks proxy.
ssh -N -D 5000 user@server -p9000
5000 will be the local port the user uses for socks5 proxy
server:9000 is the ssh port of the server (the port forwarding)
-N means that a terminal shouldn't be opened. I will create the user with a default shell being
Now the problem is that the user can forward local ports (
-L8080:server2:80) and I want to avoid this.
Also I want the proxy to not proxy connections to anything in the server's internal network.
Is that achievable easily or not?
Are there other pitfalls I have to think about?