Files
MaxScale/server/modules/routing/dbshard/test/portblock.sh
Markus Makela a7d1a865de Updates to how shards are discovered while the module is running
SHOW DATABASES now takes notice of the state of the backends
Added scripts for sharding test preparation and local port blocking
2014-12-17 16:22:52 +02:00

10 lines
232 B
Bash
Executable File

#!/bin/bash
if [ $# -lt 1 ]
then
echo "Usage $0 <port to block>"
exit 1
fi
sudo iptables -I INPUT 1 -i lo -p tcp --dport $1 -j DROP
sudo iptables -I INPUT 1 -i lo -p tcp --sport $1 -j DROP
echo "Traffic to port $1 blocked."