Ok I just want to say thanks so far for the help you have provided. I did some research on blocking/allowing ip addresses in iptables and how crontabs work. Here is the code I came up with. BTW: The forums don't like it when I put in shell script code so I have left it out.
block.sh
iptables -p all -d 192.246.40.56 -j DROP
allow.sh
iptables -p all -d 192.246.40.56 -j ACCEPT
crontab
Block 192.246.40.56 heartbeats
0 0,4,8,12,16,20 * * * /path/to/block.sh
Allow 192.246.40.56 heartbeats
30 3,30 7,30 11,30 15,30 19,30 23 * * * /path/to/allow.sh
I am not sure if I setup the crontab correctly for the release/block times. Here is the schedule for blocking/releasing.
Block 12 am 4 am 8 pm 12 pm 4pm 8 pm
Release 3:30 am, 7:30 am, 11:30 am, 3:30 pm, 7:30 pm, 11:30 pm
Please let me know if I am doing this correctly. Thanks for any help!