From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Daniel Collins <daniel.collins@smoothwall.net>
Cc: netfilter-devel@vger.kernel.org,
Harry Mason <harry.mason@smoothwall.net>
Subject: Re: [PATCH] Allow use of 'socket' match in OUTPUT
Date: Mon, 27 Apr 2015 13:47:59 +0200 [thread overview]
Message-ID: <20150427114759.GA6278@salvia> (raw)
In-Reply-To: <CAOmdcgWRmvq=4Fd8WN=QwptAXNUST49uAPU1BLa=ykterAyPhw@mail.gmail.com>
On Mon, Apr 20, 2015 at 11:19:16AM +0100, Daniel Collins wrote:
> Hi
>
> A little background: The 'socket' match is used with the tproxy
> feature, so a process may bind to and spoof an arbitrary client IP
> address. In iptables, the socket match is used in PREROUTING to match
> any traffic addressed to such sockets, we then use that to set a mark
> on the packet and force it to be routed locally rather than being
> passed onto the real holder of that IP address.
>
> If tproxy AND iptables-controlled policy routing (i.e. set mark in
> OUTPUT, use that in ip rule) is in use AND the new egress interface
> has a lower MTU than the original AND the server sent us a SYN-ACK
> packet with an MSS larger than the new egress interface can transmit,
> Linux will generate an ICMP fragmentation needed message, but we don't
> get to process that since socket cannot be used in OUTPUT.
I think you can use the TCPMSS target from INPUT to mangle the mss to
your mtu. I guess you're willing to avoid fragmentation as well.
prev parent reply other threads:[~2015-04-27 11:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 10:19 [PATCH] Allow use of 'socket' match in OUTPUT Daniel Collins
2015-04-27 11:47 ` Pablo Neira Ayuso [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=20150427114759.GA6278@salvia \
--to=pablo@netfilter.org \
--cc=daniel.collins@smoothwall.net \
--cc=harry.mason@smoothwall.net \
--cc=netfilter-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).