Posted: Tue Oct 15, 2013 13:07 Post subject: Iptables time module
I would like to include in my firewall:
Code:
iptables -t nat -I PREROUTING -d 1.2.3.4 -m time --weekdays Tue -j DROP
iptables -I FORWARD -d 1.2.3.4 -m time --weekdays Tue -j DROP
I have been fighting to understand all morning how to block certain IPs in iptables using time based blocking. It seems that ddwrt is using a script instead of the time module to block certain websites in access restrictions.
Do any of the builds have the time module included? I don't understand what is going on because when I was googling, the ddwrt svn with the time module included showed up on the results, and this is an included extension in the standard build of iptables...
Otherwise, what is the easiest way to implement an IP and time based block where I can determine its ruleset priority (ie place it before everything else in iptables)
Yeah, I use Access Restrictions for general stuff, but I want to flag with "-I", ie determine specifically the order of my iptables. Also, I had no luck using IPs on that page...