netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ratheesh k <ratheesh.ksz@gmail.com>
To: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
Cc: netfilter@vger.kernel.org
Subject: Re: GRE protocol .
Date: Fri, 7 May 2010 00:05:30 +0530	[thread overview]
Message-ID: <AANLkTim4Wew3a0-EecOW542_7XQwAp8roczTJC22DwpC@mail.gmail.com> (raw)
In-Reply-To: <AANLkTilUsdhWBzhfGtwplySk6klKdR0VVectHILwx9f2@mail.gmail.com>

> On Thu, May 6, 2010 at 8:35 PM, Pascal Hambourg
> <pascal.mail@plouf.fr.eu.org> wrote:
>so you must know
>that a GRE packet is RELATED to an existing PPTP connection.

In my case , if first  GRE packet comes from PPTP server and get
routed to my client machine , indicate that pptp_connection_tracking
module is loaded ? { get ACCEPTed by    iptables  -A FORWARD -m state
--state RELATED -j ACCEPT } .
[ pptp helper  will install expectation tuple ? ]

Thanks,
Ratheesh




On Thu, May 6, 2010 at 10:27 PM, ratheesh k <ratheesh.ksz@gmail.com> wrote:
> On Thu, May 6, 2010 at 8:35 PM, Pascal Hambourg
> <pascal.mail@plouf.fr.eu.org> wrote:
>> Hello,
>>
>> ratheesh k a écrit :
>>>>> iptable rules configured in my gateway machine (which act as a router)
>>>>> has no rule to allow GRE packet coming from wan side to pass thru.
>>>>> There is no ALGs loaded. Still i am able to establish a pptp
>>>>> connection. I can see GRE packet reached client machine using a
>>>>> wireshark .
>>
>> This is probably because the GRE connection is created from inside by
>> the client machine. In PPTP, GRE encapsulation is used to transport PPP
>> packets ; PPP is a peer-to-peer protocol, not a client-server protocol,
>> so both ends may send packets at the same time. If the first GRE packet
>> is sent by the PPTP client it is allowed in by your ruleset and creates
>> the connection, so the subsequent GRE packets from the server are in the
>> ESTABLISHED state and accepted. If the first GRE packet is sent by the
>> PPTP server, it is dropped by your ruleset but it does not matter,
>> because the connection will be created anyway when the client sends its
>> first GRE packet (see above case), and the server will eventuellaly
>> retransmit the dropped packets.
>>
>> Note that if your router does masquerading, this works for only one PPTP
>> connection to the same server. For simultaneous connections from several
>> internal clients to the same server, you must use the PPTP helper, so
>> the router knows which client the return GRE packets are to be forwarded to.
>>
>>> pptp pass thru works because gre connection tracking  module was built
>>> as part of kernel in my linux machine. I thought pptp_connection
>>> tracking module is the ALG for pptp connection.
>>
>> Yes it is (actually the module is named nf_conntrack_pptp, which uses
>> nf_conntrack_proto_gre).
>>
>>> But without
>>> pptp_connection tracking also , pptp pass thru works fine .
>>
>> Not in all situations, as I wrote above.
>>
>>> Then, why we need pptp_connection_tracking  module ?
>>
>> For instance you need it when several clients behind the same
>> masquerading router connect simulaneously to the same server, or when
>> the iptables ruleset does not allow any NEW packet out, so you must know
>> that a GRE packet is RELATED to an existing PPTP connection.
>>
>
>
> Thanks a lot . This cleared all my doubts . Thanks again .
>
> -Ratheesh
>

  reply	other threads:[~2010-05-06 18:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1291704212-1272660052-cardhu_decombobulator_blackberry.rim.net-422468553-@bda240.bisx.produk.on.blackberry>
2010-05-01  4:54 ` GRE protocol ratheesh k
2010-05-01  9:09   ` valerio balbi
2010-05-05 18:24     ` ratheesh k
2010-05-06 15:05       ` Pascal Hambourg
2010-05-06 16:57         ` ratheesh k
2010-05-06 18:35           ` ratheesh k [this message]
2010-05-06 22:00             ` Pascal Hambourg
2010-04-30  7:19 ratheesh k

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=AANLkTim4Wew3a0-EecOW542_7XQwAp8roczTJC22DwpC@mail.gmail.com \
    --to=ratheesh.ksz@gmail.com \
    --cc=netfilter@vger.kernel.org \
    --cc=pascal.mail@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).