From: John Lister <john.lister@kickstone.co.uk>
To: "Humberto Jucá" <betolj@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Help with packet marking
Date: Tue, 03 Apr 2012 14:41:12 +0100 [thread overview]
Message-ID: <4F7AFDF8.5070800@kickstone.co.uk> (raw)
In-Reply-To: <CACuyg262eXScuo6aLusyOScU4NEo7PEjbUqEOX_G0E-gaKS=XQ@mail.gmail.com>
Thanks to all those who offered help. I have everything working now. Not
entirely sure what happened. 2 things of note:
- I upgraded the kernel version from 2.6.31-23 to 2.6.32-40
- I was setting /proc/sys/net/ipv4/conf/all/rp_filter to 0 which worked
previously, however it would seem that in the newer kernels I have to
also set all the interface values as well. I'm using multiple IPs per
nic and not setting this causes the return packets to get lost in some
instances.
The kernel change seemed to fix the packets going out of the wrong
interface problem although I can't test this any more unfortunately -
which does seem very odd. But maybe the 2 in combination caused it?
Thanks again
John
On 29/03/2012 15:55, Humberto Jucá wrote:
> 2012/3/29 John Lister<john.lister@kickstone.co.uk>:
>> It seems to be selecting the correct route using the marks as iptables
>> reports the correct interface in the log files.
>> However the packet then goes out of a different interface.
> Show us all firewall and routing rules (at least the main)...
> iptables -t mangle -nL -v
> ip rule ls
>
>> This has always worked before, the default route is in the main table (maybe
>> not clear before) and is used so that
>> the box can route local packets out. Your example (below) would do the same
>> except skip the fwmark rules
> Not exactly. In my example, to skip the fwmark process the destination
> address must be known by the main table. And you dont need to treat
> your essential routes in alternative tables (only default gw). For
> this reason, you couldnt use a default gw in main table (*my
> example*).
>
> But, i still not sure why your setup has stopped working.
>
>> Yes, sorry when doing the example missed off the -m state --state NEW bit...
>> I still find it strange that recently packets I'd expect to be in the NEW
>> state are ESTABLISHED. eg doing
>> ping blah
>> ping blah
>> results in the first outgoing packet being NEW, but the second ping is
>> ESTABLISHED, surely this is a bug?
> Why you need to work with connection STATEs in firewall MARKs?
>
> Tell me more about your configuration.
> I can check your firewall confs if you open your ssh access for me
> (send me account in pvt - if you like).
--
Get the PriceGoblin Browser Addon
www.pricegoblin.co.uk
next prev parent reply other threads:[~2012-04-03 13:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 8:11 Help with packet marking John Lister
2012-03-29 14:55 ` Humberto Jucá
2012-03-29 15:10 ` Jan Engelhardt
2012-03-29 15:25 ` Humberto Jucá
2012-03-29 16:12 ` John Lister
2012-04-03 13:41 ` John Lister [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-28 14:56 John Lister
2012-03-28 17:30 ` Humberto Jucá
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=4F7AFDF8.5070800@kickstone.co.uk \
--to=john.lister@kickstone.co.uk \
--cc=betolj@gmail.com \
--cc=netfilter@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.