Skip to content
MediumSSHBLWK-SSH-007

SSH tun-device (layer 2/3) tunneling is enabled ​

What this means ​

PermitTunnel is set to “‹permit tunnel›” in sshd_config. Unlike ordinary TCP port forwarding, tun-device tunneling gives an SSH client a full virtual network interface into this host's network — a much broader pivot/VPN-like capability that's rarely needed and should be off by default.

How to fix it ​

Set PermitTunnel no in /etc/ssh/sshd_config and run systemctl restart sshd.

Check it yourself ​

Run a scan and look for BLWK-SSH-007 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
permit_tunnel == "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.