Is it possible to limit port forwarding with OpenSSH? I'd like to let users ssh -R on ports 6000..7000, but I'd like to block ssh -D and ssh -L.
| |||
|
feedback
|
|
The configuration directives for sshd_config that you're interested in include:
There does not seem to be any granularity in regards to restricting the type of port forwarding allowed. However, pay attention to the documentation for the AllowTCPForwarding option:
The concept being that if your users have shell access, it's trivial for them to setup their own forwarding once they are logged in using a utility such as netcat. This would circumvent any sshd configuration settings. | |||
|
feedback
|
|
There's also the use of | |||
|
feedback
|
|
http://www.manpagez.com/man/8/sshd/ Search for PermitOpen I do:
| |||
|
feedback
|