From: Oskar Berggren <oskar.berggren@gmail.com>
To: Matt Hakim <thepigs@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: fwmark & iptables
Date: Thu, 28 Jan 2010 12:37:09 +0100 [thread overview]
Message-ID: <33be4bb31001280337p1b863e12va27c12780e4198cd@mail.gmail.com> (raw)
In-Reply-To: <fcfe0b071001280237w56be822fo5fb896071faacc3b@mail.gmail.com>
Since this is output (not forward) the first routing of the packet
takes place before iptables have had a change to mark it. After the
mark it is rerouted, but the source ip-address is taken from the
output interface that comes from the first routing. At least, this is
my understanding of it.
/Oskar
2010/1/28 Matt Hakim <thepigs@gmail.com>:
> Hi,
> I want to mark packets for a particular user (iptables -t mangle -A
> OUTPUT -mowner --uid-owner rtorrent -j MARK --set-mark 1), and then
> route these packets to a VPN (ip rule add fwmark 1 lookup 200; ip
> route add default dev ppp0 table 200). Unfortunately, after I do this
> tcpdump shows that the default interfaces source address is being put
> out on the ppp0 link which I don't understand, as I would have
> expected the ppp0 interface address to be the source address. Anyway
> it fails.
> Without using MARK and ip routing based on destination works OK though
> (from all to 66.102.11.104 lookup 200; ip route add default dev ppp0
> table 200).
> Any tips? I'll hack around in the source now see what i can find.
> Thanks,
> Matt
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2010-01-28 11:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-28 10:37 fwmark & iptables Matt Hakim
2010-01-28 11:36 ` Pascal Hambourg
2010-01-28 13:26 ` Matt Hakim
2010-01-28 13:35 ` Pascal Hambourg
2010-01-28 20:50 ` Matt Hakim
2010-01-28 23:06 ` Matt Hakim
2010-01-29 6:24 ` Pascal Hambourg
2010-01-28 11:37 ` Oskar Berggren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33be4bb31001280337p1b863e12va27c12780e4198cd@mail.gmail.com \
--to=oskar.berggren@gmail.com \
--cc=netfilter@vger.kernel.org \
--cc=thepigs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox