The MikroTik firewall from the extra tab in filter rules has the time option which will allow you to establish days and hours to allow or deny client connections.
You can also achieve day-by-day bandwidth control using MikroTik's scripting tools and firewall rules along with queues to manipulate bandwidth based on specific days.
Here's how you could set up a solution that limits bandwidth based on specific days using MikroTik's scripting and task scheduling capabilities:
Step 1: Create the Queues
First, you need to configure simple queues to limit bandwidth. These queues can then be adjusted using scripts.
/queue simple add name="weekday-limit" target=192.168.88.0/24 max-limit=1M/1M
/queue simple add name="weekend-limit" target=192.168.88.0/24 max-limit=5M/5M
In this example, there are two different limits: one for weekdays and one for weekends.
Step 2: Create Scripts to Change the Rules
Now, you must create scripts that activate or deactivate the queues depending on the day. You can use MikroTik scripting to query the current day and adjust the queues as necessary.
/system script add name="apply-weekday-limits" source={
/queue simple set [find name="weekday-limit"] disabled=no
/queue simple set [find name="weekend-limit"] disabled=yes
}
/system script add name="apply-weekend-limits" source={
/queue simple set [find name="weekday-limit"] disabled=yes
/queue simple set [find name="weekend-limit"] disabled=no
}
Step 3: Program the Scripts
Use the MikroTik scheduler to run these scripts on the corresponding days.
/system scheduler
add name="enable-weekday-limits" on-event="apply-weekday-limits" start-time=startup interval=1d day=mon,tue,wed,thu,fri
add name="enable-weekend-limits" on-event="apply-weekend-limits" start-time=startup interval=1d day=sat,sun
These scheduled events will ensure that the rules are automatically applied based on the day of the week.
Final Considerations
- Testing: Be sure to test your configuration in a controlled environment before deploying it to production to ensure that scripts and queues work as you expect.
- Security and Maintenance: Regularly check queues and scripts to ensure there are no conflicts or performance issues.
- Documentation: Documents all scripts and configuration well for future reference or new personnel.
This solution is not native and requires some familiarity with MikroTik scripting, but it is an example of how you can extend the capabilities of RouterOS to meet specific network management requirements.
There are no tags for this post.