Completely suspending service to a customer at a given time using simple queues on MikroTik is not directly possible, because simple queues are designed to limit broadband speed, not to completely disable or block network access. However, you can achieve a similar sleep effect by configuring queues to minimize bandwidth allocation at specified times. Here I explain how you could configure it:
Configuring Simple Queues to Limit Access
Access your MikroTik router: You can do this through WinBox, WebFig, or SSH.
Navigate to the queues section: Generally found under “Queues” in WinBox or in the web interface.
Create a new simple queue: Click the plus sign (+) to add a new queue. Here you will configure the parameters for the specific client.
Configure queue parameters:
Name: Assigns a descriptive name to the queue.
Target: Specifies the client's IP address or range of IP addresses to which the queue will apply.
Max Limit: Set this value to the lowest possible, such as 1Kbps, to effectively throttle the connection to an unusable speed for the specified times.
Schedule changes using scripts: To automate the activation and deactivation of this limitation at specific times, you can use the MikroTik scripting system to modify the properties of the simple queue. Here is an example of how you could write a script:
:if ([/clock get time] = "22:00:00") do={
/queue simple set [find name="nombre_de_la_cola"] max-limit=1K/1K
}
:if ([/clock get time] = "08:00:00") do={
/queue simple set [find name="nombre_de_la_cola"] max-limit=100M/100M
}
This script reduces the speed limit to 1 Kbps at 10 PM and resets it to 100 Mbps at 8 AM, for example.
Deploy the script: You must add the script to MikroTik's scheduled tasks so that it runs at the desired times.
Considerations
- Better approach: Although single queues can limit speed to almost zero, a more effective approach to completely suspend service would be to use firewall rules to block all traffic to/from client IPs at specific times.
- Service implications: Limiting speed to extremely low values may not be the best practice for managing client access as it may result in poor user experience and technical issues. Consider the implications of this action and evaluate if it is the best solution for your needs.
This method provides a viable solution within MikroTik's capabilities to manage client access on a scheduled basis, albeit with certain limitations.
There are no tags for this post.