Skip to content

Instantly share code, notes, and snippets.

@Aposhian
Aposhian / simulate-bad-connection.sh
Created March 11, 2021 13:57
Simulate a lossy network connection
#!/usr/bin/env bash
[ "$(id -u)" != "0" ] && echo "Please run as root" && exit 1
function usage {
echo "Usage:
./simulate_bad_connection.sh (-a | --address) <dest-ip-address>
[ -d | --delay ] <delay-in-ms>
[ -t | --timeout ] <timeout-seconds>
"