Block Access OPENWRT – TPLink MR3020

After installing the Openwrt on the TPLINK MR3020 got everything running so next on the list was to have the box make internet access available on between certain times.

so after a bit of poking around came up with this.

You will need tobe comfortable using a terminal program to access the box via SSH.

So Ill assume that you can a command prompt in front of you.

essentially we are going to add this

config rule
option src lan
option dest wan
option src_ip 192.168.1.27
option proto all
option start_time 21:00
option stop_time 18:00
option weekdays ‘mon tue wed thu fri sat sun’
option target REJECT

The package iptables-mod-ipopt must be installed to provide xt_time that is used in the config rule.

we are going to edit /etc/config/firewall

so lets start on the command prompt type

vi /etc/config/firewall go to the end of the file and the press i then press return

then type in the config rule above.

when done press the esc key and type 😡 this will save tour changes.

The last thing todo is then restart the firewall with this command.

/etc/init.d/firewall restart

Some of the information came from this page OPENWRT CONFIG