-2

I've read about statistic module that can help simulate packet loss:

iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP

But is it possible to do that not for all incoming connections, but for a specific IP address?

user2358916
  • 15
  • 1
  • 5

1 Answers1

3

You can specify the source IP address in the rule:

iptables -A INPUT -s <SOURCE_IP_ADDRESS> -m statistic --mode random --probability 0.1 -j DROP
Yoel
  • 9,144
  • 7
  • 42
  • 57