This is a simple and crude method to disable an interface based on the volume of data that has gone through it. In the below example we will be using the rx bytes on ether4 In the example above the above script is scheduled to run every 5 mins, if […]
Mikrotik
Below is a simple example of how to use QOS for VOIP in ROS /ip firewall mangleadd action=mark-connection chain=prerouting comment=\“Mark Voip Connections SRC” new-connection-mark=voip_connections \passthrough=yes src-address-list=voipadd action=mark-connection chain=prerouting comment=\“Mark Voip Connections DST” dst-address-list=voip new-connection-mark=\voip_connections passthrough=yesadd action=mark-packet chain=prerouting comment=”Mark Voip Packets SRC” \connection-mark=voip_connections new-packet-mark=voip_packets \passthrough=no src-address-list=voipadd action=mark-packet chain=prerouting comment=”Mark Voip Packets […]
These are the domains to harvest IP addresses for; .facebook.com.fbcdn.net.facebook.net Add your local src IP Subnet to the rule below, then repeat twice more using .fbcdn.net and .facebook.net chain=forward action=add-dst-to-address-list src-address=YourLocalIpSubnet address-list=Facebook IPs address-list-timeout=4d content=.facebook.comlog=no log-prefix=”” Next add the rule below, this rule will block any IP on your local […]
/ip firewall filter add action=drop chain=forward dst-address-list=TikTok src-address=10.0.0.0/24 /ip firewall mangle add action=add-dst-to-address-list address-list=TikTok address-list-timeout=4w2d chain=prerouting content=.tiktok.com src-address=10.0.0.0/24 add action=add-dst-to-address-list address-list=TikTok address-list-timeout=4w2d chain=prerouting content=.tiktokv.com src-address=10.0.0.0/24 add action=add-dst-to-address-list address-list=TikTok address-list-timeout=4w2d chain=prerouting content=.tiktokcdn.com src-address=10.0.0.0/24 add action=add-dst-to-address-list address-list=TikTok address-list-timeout=4w2d chain=prerouting content=.byteoversea.com src-address=10.0.0.0/24 add action=add-dst-to-address-list address-list=TikTok address-list-timeout=4w2d chain=prerouting content=.ibyteimg.com src-address=10.0.0.0/24 add action=add-dst-to-address-list address-list=TikTok address-list-timeout=4w2d […]
If you have a user that can only log into a PPP (L2TP, PPTP etc) session on a Mikrotik during a certain time period, you can create scripts that run on a schedule to enable the user at the desired time and disable the user when their work day ends. […]
If you ever have the need to only allow PPP connection(s) (L2TP, PPTP etc) for a certain time period, you can use the below in a script or add directly to a schedule to terminate a PPP user that has an active connection. Replace user.name with the actual name /ppp […]
Unplug your device from the power Press and hold the reset button and apply the power When LED starts flashing, release the button
Stop unathorised access Block unwanted ports Classify and mark connections and packets for QOS or Routing Policy Firewall Functions: Filter packets using filter rules NAT: SRCNAT and DSTNAT to translate source and destination addresses Mangle: to mark connections and/or packets RAW: drop or bypass packets before reaching the connection tracking […]
OverviewRouterOS provides SSH client that supports SSHv2 logins to SSH servers reachable from the router. RequirementsFor this command to be available router has to have system and security packages installed. SSH/system ssh [remote-ip]In this case the username thats provided to the remote host is the one that is logged into […]
# Average CPU Load Notification.# This will email you once when average CPU Load reaches the set CPU Threshold value.# When average CPU Load drops back below CPU Threshold the email notification is reset.# Set up the scheduler to run this at 1-5 second intervals (Sample Rate).# Original credit goes […]
The below can be used to add a local user to a Mikrotik using a script or at the CLI /user add name=setusername password=setpassword group=write Just change “setusername” to the desired name and “setpassword” to the desired password (be warned this is in plain text and care needs to be […]
The below can be used in a schedule or script to control rules, just change “enable” to “disable” to disable the rule and “BlockKids” is the comment so change to suit your needs. /ip firewall filter enable [find comment=”BlockKids”];
This script will export the config from your mikrotik router and email it to your email address. The scheduled time between exports and email sending can be decided by you. The exported file will take the name of your system identity ending in the extension .rsc /export file="$[/system identity get […]