Since 563 is the server port, should I change dport to sport, since its traffic coming down from server port 563 to LAN?
Both dport and sport will produce valid rules.
I think dport is the correct rule in 99% of the cases(read below). Fee free to add dport and sport simultaneously.
Download traffic is on the br0 interface
--dport is destination port on your computer
--sport is source port from the sever
(Every source has a destination but they don't have to be the same)
I only I included dport download templates since you have control on what port your application uses to receive data. You really don't have any control of the server originating port. Seemed a lot more logical. But yes, changing the d to an s is all that would be required. Server can have many sports pointing to your constant dport! Do you. Do you not have control of the applications receiving port?
Upload traffic is in the eth0 interface
--sport is the source port of your router **not computer** (router source port may or may not be the same we the source port of your computer depending if different external to internal ports or mapped)
--dport is the sever destination port
The best place for custom rules is AFTER the following prio delete command on each respective interfaces. There are other active rules and comments in the area you should be pasting. Just group the br0 or eth0 rules together.
Code:
tc filter dev (br0 or eth0) del prio1
The already commented rule examples are in the correct position. You can remove the comment and change the single variable pertaining to you, and you will have a fully functioning rule. The comment is the # character.
The comments are pretty extensive. Read them! They really don't leave much to imagination if you try to correlate the variables to their actions.
@maxsteel if you want a custom rule for your traffic you have to know what type of custom rule you want. A rule filtering on destination port is cery common. Figure out what port the application is using and paste that rule in the script in the correct spot before the install process. It's only 1 additional step.
@Jack Yaz no multiple calls should not cause a problem. After its initial rule modification, the script has conditional statements so it doesn't run again unless initial changes disappeared. It will physically run the script but the script will not do much besides generate logs that it started and no actions were taken. If you find issues then post them and I will try to address them.