All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Thomas Heinz <thomasheinz@gmx.net>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Ipsec, policy match and PROTO=4
Date: Fri, 04 Aug 2006 21:46:36 +0200	[thread overview]
Message-ID: <44D3A41C.9080606@trash.net> (raw)
In-Reply-To: <200607270131.18655.thomasheinz@gmx.net>

Thomas Heinz wrote:
> Hello guys
> 
> I have the following standard ipsec tunnel:
> 
> [tun_A] host_A [pub_A]-------------[pub_B] host_B [tun_B]
> 
> pub_A/B: public IP of host_A/B
> tun_A/B: tunnel IP of host_A/B
> 
> After establishing the ipsec connection, putting two simple log-all rules 
> in INPUT and OUTPUT like this:
> # iptables -I INPUT -j LOG
> # iptables -I OUTPUT -j LOG
> and pinging tun_B from host_A, I get the following log entries:
> 
> IN= OUT=eth0 SRC=tun_A DST=tun_B LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF 
> PROTO=ICMP TYPE=8 CODE=0 ID=16181 SEQ=1
> IN= OUT=eth0 SRC=pub_A DST=pub_B LEN=136 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF 
> PROTO=ESP SPI=0xxxxxxxxx
> 
> Very nice so far: the packet is seen twice, once clear and once encrypted. 
> Now, let's look at the ICMP reply.
> 
> IN=eth0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=pub_B 
> DST=pub_A LEN=136 TOS=0x00 PREC=0x00 TTL=56 ID=57843 PROTO=ESP 
> SPI=0xxxxxxxxx
> IN=eth0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=pub_B 
> DST=pub_A LEN=104 TOS=0x00 PREC=0x00 TTL=56 ID=57843 PROTO=4
> 
> Here, we see the packet also twice but the cleartext one has PROTO=4 
> (ipencap, ipip tunnel).

The cleartext packet should also be seen with the real protocol after
that. What do your policies look li

  parent reply	other threads:[~2006-08-04 19:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-26 23:31 Ipsec, policy match and PROTO=4 Thomas Heinz
2006-08-04  6:15 ` Thomas Heinz
2006-08-04 19:46 ` Patrick McHardy [this message]
2006-08-04 20:57   ` Thomas Heinz
2006-08-08  7:50     ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2006-07-25 18:59 Thomas Heinz
2006-07-26  7:29 ` Marco Berizzi
2006-07-26 15:27   ` Thomas Heinz
2006-07-26 15:45     ` Marco Berizzi
2006-07-26 15:53       ` Thomas Heinz

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=44D3A41C.9080606@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=thomasheinz@gmx.net \
    /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.