Access Restrictions - WAN Access Policy - by schedule

Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware
Author Message
skippyV
DD-WRT Novice


Joined: 01 Dec 2025
Posts: 10

PostPosted: Mon Dec 01, 2025 15:44    Post subject: Access Restrictions - WAN Access Policy - by schedule Reply with quote
Have DD-WRT (Nov 26,2025) installed on Netgear R6700(V2) NightHawk router.
Have a local wired LAN setup such that each computer on the LAN has a Static Lease with no expiration. Some of those computers I've designated IPs within a "range".

In Access Restriction, the WAN Access Policy is enabled with Deny selected. My List of Clients that I want targeted for this restriction, only has the IP range set for IP Range 01.

The Time Period is configure as: 0:00 To 7:00

However, the computers still had access after midnight. Does the WAN access affect LAN connected computers?
Sponsor
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2191

PostPosted: Mon Dec 01, 2025 18:05    Post subject: Reply with quote
Try 00:01 to 7:00
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 7044
Location: UK, London, just across the river..

PostPosted: Mon Dec 01, 2025 20:53    Post subject: Reply with quote
not sure if WAN Access restriction is working...

try this if your router supports it...

iptables -I FORWARD -s 192.168.1.101 -m time --timestart 0:01 --timestop 7:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j REJECT


192.168.1.101 --- must be your client IP

_________________
Atheros
TP-Link WR1043NDv2 -DD-WRT 62606 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 -DD-WRT 62890 GTW/SmDNS/DoT,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT 62606 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 62606 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Dynalink DL-WRX36-DDWRT 62606
Broadcom
Netgear R7000 --DD-WRT 63020 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
skippyV
DD-WRT Novice


Joined: 01 Dec 2025
Posts: 10

PostPosted: Wed Dec 03, 2025 5:29    Post subject: Reply with quote
bushant wrote:
Try 00:01 to 7:00

Did not seem to help. Sad
skippyV
DD-WRT Novice


Joined: 01 Dec 2025
Posts: 10

PostPosted: Wed Dec 03, 2025 5:36    Post subject: Reply with quote
Alozaros wrote:
not sure if WAN Access restriction is working...

try this if your router supports it...

iptables -I FORWARD -s 192.168.1.101 -m time --timestart 0:01 --timestop 7:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j REJECT


192.168.1.101 --- must be your client IP


I have a range of IPs that I want to "turn off" the Internet for at midnight.

So tried your command with an iprange added:

iptables -I FORWARD -m iprange --src-range 10.0.0.30-10.0.0.255 -m time --timestart 0:01 --timestop 7:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j REJECT

Weirdly the client of 10.0.0.30 lost Internet access at 7pm. And other IPs in that range did not lose Internet connectivity. At least that is some success of a sort.
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 7044
Location: UK, London, just across the river..

PostPosted: Wed Dec 03, 2025 6:35    Post subject: Reply with quote
hmm your range its not a correct to convert it, IP Range To CIDR, try to express it as a CIDR notation
but it would look like
10.0.0.30/31
10.0.0.32/27
10.0.0.64/26
10.0.0.128/25

iptables -I FORWARD -s 10.0.0.30/31 -m time --timestart 0:01 --timestop 7:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j REJECT

so, one rule for each line to work as intended...kind of..

Also to note, newer builds than 62606 moved to nft-tables and currently there is a glitch with iptables to nft-tables translation...so you may need to use 62606 build and than once the transition to nft-tables settles down, convert all your rules to nft-tables...

At the moment on the newer builds, both rules sets are working at the same time.....and some complex rules are not translated...correctly...to nft-tables...kind of... Cool

_________________
Atheros
TP-Link WR1043NDv2 -DD-WRT 62606 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 -DD-WRT 62890 GTW/SmDNS/DoT,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT 62606 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 62606 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Dynalink DL-WRX36-DDWRT 62606
Broadcom
Netgear R7000 --DD-WRT 63020 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
skippyV
DD-WRT Novice


Joined: 01 Dec 2025
Posts: 10

PostPosted: Sat Dec 06, 2025 15:41    Post subject: Reply with quote
@Alozaros, thanks for all your help. Unfortunately, I'm still not there yet.

I put the 62606 build on it. Then used Administration->Commands to execute each of these commands individually. One at a time.

iptables -I FORWARD -s 10.0.0.30/31 -m time --timestart 0:01 --timestop 7:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j REJECT
iptables -I FORWARD -s 10.0.0.32/27 -m time --timestart 0:01 --timestop 7:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j REJECT
iptables -I FORWARD -s 10.0.0.64/26 -m time --timestart 0:01 --timestop 7:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j REJECT
iptables -I FORWARD -s 10.0.0.128/25 -m time --timestart 0:01 --timestop 7:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j REJECT

However, the result was similar to before. The machine at 10.0.0.30 had packets rejected starting at 7pm. Instead of the desired time of 00:01 to 07:00.

Meanwhile, none of the other computers were affected even though they also belonged to the ranges above.

Also note the DD-WRT Gui displays the correct time.

Any more suggestions?
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16576
Location: Texas, USA

PostPosted: Sat Dec 06, 2025 16:40    Post subject: Reply with quote
The kernel time zone may be UTC, regardless of all the things done to make the syslog pretty for folks who don't understand the standard.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
skippyV
DD-WRT Novice


Joined: 01 Dec 2025
Posts: 10

PostPosted: Sat Dec 06, 2025 16:58    Post subject: Reply with quote
kernel-panic69 wrote:
The kernel time zone may be UTC, regardless of all the things done to make the syslog pretty for folks who don't understand the standard.


How do I verify this? Or fix this if that is the case?

If I enter "date" in Administration-Commands the output is: Sat Dec 6 11:54:23 EST 2025
Which matches my local zone/time.
skippyV
DD-WRT Novice


Joined: 01 Dec 2025
Posts: 10

PostPosted: Mon Dec 08, 2025 21:03    Post subject: Reply with quote
Still trying to get these IPTABLES rules to work... so decided to start over with just ONE rule in this attempt. Which targets only 2 computers with this particular CIDR.

All these commands are done via SSH/Putty.

Changed the time for a 30 minute window and waited. But the targeted Computer still had access - no change.
This command was entered after power cycling the router and ensuring only the default rules were in place.

Attached screenshot



output-after-first-command.png
 Description:
 Filesize:  68.6 KB
 Viewed:  57 Time(s)

output-after-first-command.png


Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum