Skip to content

Instantly share code, notes, and snippets.

@jpetazzo
Created October 17, 2012 17:22
Show Gist options
  • Save jpetazzo/3906848 to your computer and use it in GitHub Desktop.
Save jpetazzo/3906848 to your computer and use it in GitHub Desktop.
Simulate breaking of HTTP connection
# You can adapt this; notably, I suggest that you:
# - change the port to your liking
# - maybe add a destination IP address to break more selectively
# - change the "4:" value (it says after how many packets the connection should break)
iptables -A OUTPUT -j REJECT --reject-with tcp-reset \
-p tcp --dport 443 \
-m connbytes --connbytes-dir both --connbytes-mode packets --connbytes 4:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment