如何控制每个IP的上网时间?
如何为该规则添加时间:iptables -I FORWARD -s 192.168.0.56 -j ACCEPT?
我试过这个
iptables -I FORWARD -s 192.168.0.56 -m time --timestart 13:00 --timestop 14:00 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)
和
iptables -I FORWARD -s 192.168.0.56 --match time --weekdays Mon,Tue,Wed,Thu,Fri --timestart 09:00 --timestop 10:00 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)
但它不起作用
也许有另一种方法可以做到?
Operating system: Ubuntu 18.04.4 LTS
root@router:/home/wlodek# iptables -L FORWARD
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- 192.168.0.56 anywhere TIME from 09:00:00 to 10:00:00 on Mon,Tue,Wed,Thu,Fri UTC
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED …Run Code Online (Sandbox Code Playgroud) iptables ×1