SSH option AllowTcpForwarding is bypassable

port-forwardingPROXYsshtunneling

I understand this is used to prevent users from using the server as a proxy.
But if the users can use curl/wget, doesn't that mean it's essentially bypassable?

The manual page regarding SSH also said the same thing, but it wasn't very specific as to how this was doable.

Best Answer

My experience is that you only use this option in conjunction with a restricted shell like you might set with command= in the authorized_keys. It isn't very useful when you grant the user full shell access.

If you had shell access one method from the bygone days would be to use a tool like slirp which would basically emulate give you a PPP connection to the box.

I am not sure of the specific methods using curl/wget, but I would not be surprised about them at all. Though I think it would be a lot easier to bypass if netcat was on the remote system.