netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Ruppert <idl0r@qasl.de>
To: Pascal Hambourg <pascal@plouf.fr.eu.org>
Cc: netfilter@vger.kernel.org
Subject: Re: SYNPROXY *NAT/redirects etc.
Date: Tue, 28 Jul 2015 17:34:47 +0200	[thread overview]
Message-ID: <dfdd88e40b0e2d94b9d0dda04d4a92c1@qasl.de> (raw)
In-Reply-To: <558B27CA.20707@plouf.fr.eu.org>

Hey,

On 2015-06-24 23:57, Pascal Hambourg wrote:
> Christian Ruppert a écrit :
>> 
>> On 2015-06-23 23:33, Pascal Hambourg wrote:
>>> Christian Ruppert a écrit :
>>>> 
>>>> iptables -t raw -I PREROUTING -p tcp -m tcp --syn -j CT --notrack
>>> 
>>> This rule disables connection tracking which is required for stateful
>>> NAT operation.
>> 
>> Thanks! From what I've seen/read, this rule is required or am I wrong?
> 
> AFAIK it's not strictly required for SYNPROXY operation. It just saves
> connection tracking resources.

I tried some different setups but somehow I don't get it working.

So if we keep using the "sysctl -w 
net.netfilter.nf_conntrack_tcp_loose=0"
Which is still being used by:
iptables -I INPUT -p tcp -m tcp -m conntrack --ctstate INVALID -j 
SYNPROXY --sack-perm --timestamp --wscale 7 --mss 1460

I thought I could just avoid that --notrack rule and therefor do 
something like:
iptables -I INPUT -p tcp -m tcp --syn -j SYNPROXY --sack-perm 
--timestamp --wscale 7 --mss 1460

But that doesn't work (neither new nor established connections work, 
default INPUT is DROP btw.). What's the difference here between the 
raw/PREROUTING rule that basically just marks it as untracked so it can 
be passed to the extension in the filter table and just doing "--syn -j 
SYNPROXY ..." in the filter table? Does the "--notrack" one actually 
more?
I need to keep the NAT/redirect functionality while using the SYNPROXY 
extension.

-- 
Regards,
Christian Ruppert

      reply	other threads:[~2015-07-28 15:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 13:32 SYNPROXY *NAT/redirects etc Christian Ruppert
2015-06-23 21:33 ` Pascal Hambourg
2015-06-24 18:07   ` Christian Ruppert
2015-06-24 21:57     ` Pascal Hambourg
2015-07-28 15:34       ` Christian Ruppert [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=dfdd88e40b0e2d94b9d0dda04d4a92c1@qasl.de \
    --to=idl0r@qasl.de \
    --cc=netfilter@vger.kernel.org \
    --cc=pascal@plouf.fr.eu.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).