Turning off TCP in time intervals

Hi
I need to turn off all tcp traffic for x time in seconds every y time intervals. Is that possible with some script?