Problem using fwmark -- how to mark packets from local host?

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

 



I'm trying to use fwmark to mark packets so that they can be routed to a particular interface.

I'm doing this:

iptables -t mangle -A PREROUTING -d ! $inet -j MARK --set-mark 0x0a -p tcp --dpo
rt 25
ip route add default via $IPADDR2 table TSMTP
ip rule add pref 1 fwmark 0x0a table TSMTP

I'm also using NAT and masquarading.

The rules above work for packets received from other systems that are going through NAT, but it doesn't work for packets from the local system. Those packets are still going out through the normal default route of the system.

Is there a way to mark packets originating on the local system?

Thanks,

John Spicer


[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