Skip to content

Instantly share code, notes, and snippets.

@SammyVimes
Created December 2, 2016 10:37
Show Gist options
  • Save SammyVimes/ea2786f10db137e3301dd845702c65c3 to your computer and use it in GitHub Desktop.
Save SammyVimes/ea2786f10db137e3301dd845702c65c3 to your computer and use it in GitHub Desktop.
# for randomly dropping 10% of incoming packets:
iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP
# and for dropping 10% of outgoing packets:
iptables -A OUTPUT -m statistic --mode random --probability 0.1 -j DROP
# for the incoming packets:
iptables -D INPUT -m statistic --mode random --probability 0.1 -j DROP
# and for the outgoing packets
iptables -D OUTPUT -m statistic --mode random --probability 0.1 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment