Hello guys welcome again today am going to share with you how you can optimize the mangle rule we created earlier in this blog. So the optimization or enhancement we are about to do will include traffic going to your router, DNS rule and our updated http rules.
So the first thing we will do is to add address list to the routers.
In address you will have to put address for your router click ok and apply.
So now we go over to mangle, and here am going to integrate a mangle rule for my router. Here am going to use a chain called prerouting:
let me explain what the prerouting rules does in you router:
The prerouting rule says that you will capture the traffic before the traffic is routed. So this means that we are going capture these traffic before it is routed.
We are done with that.
Again we click on advance, on the destination address list am going to choose router because that is where all the traffic will be forwarded.
The action we are going to take is accept. Click on apply and okay now we will move these rules on top of the rules in the mangle table for it to be very effective.
Let see if we can add another rule for the DNS.
So we click on the add button.
The chain we are using for the DNS is forward because we are forwarding packet to a particular DNS.
Protocol is tcp.
Port will be port 53.
Action is going to be accept. Then we will Click on apply and okay.
This new rule we create will be move up to the table since we want to execute them first.
After this configuration what you have just done is that you have optimized or enhanced your mangle rule in your mikrotik router