Ho to use fwmark with masquearading ?
Hello
I want to route all smtp trafic to a 2. provider.
I'm using masquerading on both ehternet interfaces which
everyone has a modem connected.
I have 2 seperate tables for special routing.
What I have done:
iptables -t mangle -A PREROUTING -p tcp -m tcp --dport 25 -j MARK --set-mark 0x7
iptables -t mangle -A PREROUTING -p tcp -m tcp --dport 25 -j RETURN
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 25 -j MARK --set-mark 0x7
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 25 -j RETURN
ip rule add fwmark 0x7 table gugus
This doesn't seem to work.
Tcpdump shows me that the packets goes still through default
gateway an not through table gugus.
How can I see if the packet has the mark 0x7 set?
What do I wrong?
BTW: The smtp packets are forwared packets ...
Thanks a lot for any help
Beat
|