rp_filter

The rp_filter can reject incoming packets if their source address doesn’t match the network interface that they’re arriving on, which helps to prevent IP spoofing. Turning this on, however, has its consequences: If your host has several IP addresses on different interfaces, or if your single interface has multiple IP addresses on it, you’ll find that your kernel may end up rejecting valid traffic. It’s also important to note that even if you do not enable the rp_filter, protection against broadcast spoofing is always on. Also, the protection it provides is only against spoofed internal addresses; external addresses can still be spoofed.. By default, it is disabled. To enable it, run the following:

if [ -r /proc/sys/net/ipv4/conf/all/rp_filter ]; then echo “Enabling rp_filter” echo “1″ > /proc/sys/net/ipv4/conf/all/rp_filter fi

原文

在 Linux 接收网络数据包时,如果一个包的源地址与其网卡地址不相符,则可通过 rp_filter 选项禁止接受这类包。通过这个来方式 ip 欺骗。
需要注意的是,如果你的机器有多个网卡,不同的网卡有不同的IP;或者单个网卡有不同的IP。你的内核可能会禁止正常的包。
另外,就算你没有打开 rp_filter 选项。“防止广播欺骗”的功能是一直被开启的。不过他只针对内网地址,外网地址并不会被过滤。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值