Skip to content

Commit

Permalink
Limit SSH server AllowTcpForwarding
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Aseev <[email protected]>
  • Loading branch information
MikhailAseev committed Aug 21, 2024
1 parent 975dff3 commit 956edbc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions controls/sshd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
sshd_valid_kexs = input('sshd_valid_kexs', value: ssh_crypto.valid_kexs)
sshd_valid_macs = input('sshd_valid_macs', value: ssh_crypto.valid_macs)
sshd_permittunnel = input('sshd_permittunnel', value: 'no')
sshd_tcpforwarding = input('sshd_tcpforwarding', value: 'no')
sshd_agentforwarding = input('sshd_agentforwarding', value: 'no')
sshd_gatewayports = input('sshd_gatewayports', value: 'no')
sshd_x11forwarding = input('sshd_x11forwarding', value: 'no')
Expand Down Expand Up @@ -413,7 +412,7 @@
title 'Server: Disable TCP forwarding'
desc 'If you use TCP forwarding in an uncontrolled manner then you can bypass the firewalls'
describe sshd_config("#{sshd_custom_path}/sshd_config") do
its('AllowTcpForwarding') { should eq(sshd_tcpforwarding) }
its('AllowTcpForwarding') { should match(/^no|local$/) }
end
end

Expand Down

0 comments on commit 956edbc

Please sign in to comment.