5.31. 启用 IP 欺骗保护

欺骗保护可以防止您的网络成为欺骗 伪造通信的来源,这些伪造通信通常用于 DoS 攻击。

Version 6.1 only

              [root@deep] /# for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
              > echo 1 > $f
              > done
              
              [root@deep] /#
              
将以上命令添加到/etc/rc.d/rc.local脚本文件中,下次重新启动系统时,您就不必再次输入这些命令了。

Version 6.2 only

编辑/etc/sysctl.conf文件,并添加以下行
              # Enable IP spoofing protection, turn on Source Address Verification
              net.ipv4.conf.all.rp_filter = 1
              
您必须重启网络才能使更改生效。 手动重启网络的命令如下
              [root@deep] /# /etc/rc.d/init.d/network restart
              Setting network parameters	[  OK  ]
              Bringing up interface lo		[  OK  ]
              Bringing up interface eth0	[  OK  ]
              Bringing up interface eth1	[  OK  ]