Linux Netfilter discussions
 help / color / mirror / Atom feed
* RE: Problem using fwmark -- how to mark packets from local host?
@ 2004-03-03 22:17 Daniel Chemko
  2004-03-03 22:43 ` John H. Spicer
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Chemko @ 2004-03-03 22:17 UTC (permalink / raw)
  To: John H. Spicer, netfilter

Use the OUTPUT chain instead of the PREROUTING chain for packets
originating from the local system.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Problem using fwmark -- how to mark packets from local host?
@ 2004-03-03 22:09 John H. Spicer
  0 siblings, 0 replies; 3+ messages in thread
From: John H. Spicer @ 2004-03-03 22:09 UTC (permalink / raw)
  To: netfilter

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-03 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-03 22:17 Problem using fwmark -- how to mark packets from local host? Daniel Chemko
2004-03-03 22:43 ` John H. Spicer
  -- strict thread matches above, loose matches on Subject: below --
2004-03-03 22:09 John H. Spicer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox