Networking iptables-模拟特定ip地址的数据包丢失
我读过有关统计模块的内容,该模块可以帮助模拟数据包丢失:Networking iptables-模拟特定ip地址的数据包丢失,networking,iptables,packet-loss,Networking,Iptables,Packet Loss,我读过有关统计模块的内容,该模块可以帮助模拟数据包丢失: iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP 但是,是否可以不针对所有传入连接,而是针对特定IP地址执行此操作?您可以在规则中指定源IP地址: iptables -A INPUT -s <SOURCE_IP_ADDRESS> -m statistic --mode random --probability 0.1 -j DROP
iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP
但是,是否可以不针对所有传入连接,而是针对特定IP地址执行此操作?您可以在规则中指定源IP地址:
iptables -A INPUT -s <SOURCE_IP_ADDRESS> -m statistic --mode random --probability 0.1 -j DROP