In the man pages for sshd_config
, for the AllowTCPForwarding
option, it states:
AllowTcpForwarding
Specifies whether TCP forwarding is permitted. The default is “yes”. Note that disabling TCP forwarding does not improve security unless users are also denied shell access, as they can always install their own forwarders.
Can someone please elaborate? I do not understand how someone can install their own forwarder to circumvent TcpForwarding. Would one have to install a proxy server of sorts and then create a tunnel to the remote proxy server?
iptables -P INPUT -j DROP
(or equivalent) along with rules to allow the traffic you want, of course. Which should be done already on any system where someone would consider turning off AllowTcpForwarding. – derobert Dec 06 '12 at 16:12