Linux distributions
CIS-LINUX-3.2.1
Ensure IP forwarding is disabled
中级别 1自动化linux
说明
The net.ipv4.ip_forward flag controls whether the system forwards packets. Disable it unless the host is a router.
检查方式
审计方法: Shell 命令
shell
sysctl -n net.ipv4.ip_forward- 预期输出
0
修复方式
修复方法: Shell 命令
shell
sysctl -w net.ipv4.ip_forward=0属性
- 操作系统
- ubuntu-22.04, ubuntu-24.04, rocky-9
- 标签
- networksysctl
- 参考
- CIS Ubuntu Linux / Rocky Linux Benchmarks - Ensure IP forwarding is disabled (verify section number for your release)
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target linux