Example 2 – penalizing peer-to-peer traffic

Dealing with P2P traffic is a bit more challenging. We are unlikely to be able to categorize every protocol and port used by P2P applications, and finding other matching criteria may be difficult. But if we can assume a certain range of ports is being used, we can create a rule. Moreover, we can at least create a queue for future use.

Once again, we begin by navigating to Firewall | Traffic Shaper and clicking on the By Interface tab. We then proceed as follows:

  1. Click on WAN on the left sidebar.
  2. If you have been following the examples sequentially, you won't have to create the parent queue for the WAN interface. Otherwise, see the previous example to see how to configure the parent queue on the WAN interface. If the WAN parent queue already exists, click on the Add new Queue button.
  3. Check the Enable/Disable checkbox for the new queue.
  4. In the Name field, type qP2P.
  5. Set Priority to 1. You can leave Queue Limit blank.
  6. In Scheduler options, check Explicit Congestion Notification. You may enter a brief description in the Description field.
  7. Click on the Save button, then when the page reloads click on the Apply Changes button.
  8. Click on the By Queue tab. The qP2P queue should be listed on the left sidebar.
  9. Click on qP2P. The right side of the page should display all interfaces, with a Clone Shaper to this Interface button for each interface. Click on each button to clone qP2P to each interface. Then click on the Apply Changes button at the top of the page.
  10. Click on By Interface to confirm that the qP2P queue is available on all interfaces.
  11. Navigate to Firewall | Rules and click on the Floating tab; we will now create a rule for P2P traffic. Assume that we are going to send traffic on ports 6881 to 6999 to qP2P.
  12. Click on one of the Add buttons at the bottom of the page.
  13. On the rule configuration page, select Match in the Action drop-down box.
  14. In the Interface list, select WAN.
  15. Leave Direction set to any. In the Protocol drop-down box, change the protocol to TCP/UDP.

 

  1. In the Destination section, set Destination port range to 6881 to 6999. Under Extra Options, you may enter a brief description.
  2. Also under Extra Options, click on the Display Advanced button.
  3. Scroll down to Ackqueue/Queue and set Queue to qP2P.
  4. Click on the Save button, and on the main Floating rules page, click on the Apply Changes button.

We now have a queue for P2P traffic, and a corresponding rule. If our requirements change with respect to ports and/or protocols, we can always update the ruleset.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset