我创建了 mangle.init 和 mangle.rules。mangle.rules:
*mangle
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
# mangle Table rules
-A PREROUTING -t mangle -p tcp --sport 0:1024 -j TOS --set-tos Minimize-Delay
-A PREROUTING -t mangle -p tcp --sport 1025:65535 -j TOS --set-tos Maximize-Throughput
-A OUTPUT -t mangle -p tcp --dport 0:1024 -j TOS --set-tos Minimize-Delay
-A OUTPUT -t mangle -p tcp --dport 1025:65535 -j TOS --set-tos Maximize-Throughput
# don't delete the 'COMMIT' line or these rules won't be processed
COMMIT
但规则不起作用。如何从 iptables mangle 创建正确的 ufw 规则?Ubuntu 16.04.1 LTS、ufw 0.35-0ubuntu2、内核 4.4.0-34-generic、iptables v1.6.0