Skip to content
MediumSSHBLWK-SSH-005

SSH TCP forwarding/tunneling is enabled ​

What this means ​

AllowTcpForwarding is set to “‹allow tcp forwarding›” in sshd_config. TCP forwarding lets any SSH user open arbitrary local or remote port tunnels through this host — the exact mechanism used to pivot into internal networks or to reach services (like VNC) that are only supposed to be reachable from localhost.

How to fix it ​

Set AllowTcpForwarding no in /etc/ssh/sshd_config, or restrict it per-user with a Match block, unless tunneling is a deliberate requirement.

Check it yourself ​

Run a scan and look for BLWK-SSH-005 in the results:

sh
bulwark scan

Installed the standalone CLI package instead of the app? The command is bulwarkctl.

How Bulwark decides

Bulwark reads sshd_config and reports this check when:

text
allow_tcp_forwarding == "yes"

If a value can't be read, Bulwark reports the check as undetermined rather than passing it. View the rule source.

References ​

Released under the Apache License 2.0.