Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Networking iptables-模拟特定ip地址的数据包丢失_Networking_Iptables_Packet Loss - Fatal编程技术网

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