This rule is working for me, but how can I make this rule work for a period of time:
I am on Debian and the solutions on the net is not working for me.
08:00-12:00
13:00-19:00
Code:
BLOCK_ALLOW="192.168.2.5 192.168.2.6"
iptables -N BLOCKED
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 192.168.3.100-192.168.3.199 --dport 22 -j BLOCKED
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 192.168.3.100-192.168.3.199 --dport 3389 -j BLOCKED
for blck in $BLOCKED_ALLOW; do
iptables -A BLOCKED -s $blck -j ACCEPT
done
iptables -A BLOCKED -j REJECT
Thanks in advance.