Re: No PREROUTING for OUTPUT?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kenneth Porter wrote:
Can anyone confirm that the PREROUTING chain is absent from the OUTPUT packet path? I wanted to tag my UDP packets with TOS Minimize-Delay so that they'd go in my high-priority traffic shaping queues, but if PREROUTING isn't used in the output path, the packets can't be tagged until after they've been through the shaper. (Isn't the shaper part of "routing decision" in the diagrams?)

The equivalent of PREROUTING chain for locally generated packets would be OUTPUT chain. It exists in filter, nat, and mangle tables. I'd guess what you need is something like:


   iptables -t mangle -A OUTPUT -p udp -j TOS --set-tos Minimize-Delay
   iptables -t mangle -A PREROUTING -p udp -j TOS --set-tos Minimize-Delay

First line would handle locally generated packets, second would handle forwarded packets (it would catch incoming too, but I guess it can be safely ignored in this case).

--
Aleksandar Milivojevic <amilivojevic@xxxxxx>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux