#!/bin/bash
SEC="$3";
IPTABLES="/sbin/iptables"
case $1 in
"INPUT")
  $IPTABLES -I FORWARD -d $2 -j DROP
;;
"OUTPUT")
  $IPTABLES -I FORWARD -s $2 -j DROP
;;
esac
sleep $SEC;
case $1 in
"INPUT")
  $IPTABLES -D FORWARD -d $2 -j DROP
;;
"OUTPUT")
  $IPTABLES -D FORWARD -s $2 -j DROP
;;
esac
exit 0
