netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible bug ipsec and SNAT?
@ 2007-12-19 11:42 Slagter, EM
  2007-12-19 14:44 ` Patrick McHardy
  0 siblings, 1 reply; 5+ messages in thread
From: Slagter, EM @ 2007-12-19 11:42 UTC (permalink / raw)
  To: netfilter-devel, netfilter

Hi,

I don't know whether this netfilter behaviour is a bug or intentional,
but at least for me it's not what I'd expect (nor want).

Our system (simplified to significant parts):
- linux i386 kernel 2.6.21.2 vanilla, almost all netfilter and ipsec
parts compiled in, no (relevant) modules
- one vlan interface connected to public internet
- one vlan interface connected to internal vlan, RFC addresses
- pluto ("openswan") to manage ISAKMP, appropriate config file
- some netfilter rules that include -m policy to separate the ipsec
traffic before and after encapsulation (for instance to prevent traffic
to be sent over internet without encryption)

Using this scenario, it works pretty much as documented.

As soon as I add SNAT to traffic originating from this vlan (as required
by our supplier), the rules that (properly) used to match on "-m policy
--pol ipsec --dir out --tunnel-src ... --tunnel-dst ..." no longer
match. Even if I remove the tunnel-src and --tunnel-dst the rule no
longer matches. If I change "the --pol ipsec" to "--pol none" the rule
matches again. This is wrong IMHO as the traffic is still encapsulated
(checked this with tshark) as expected.

I've checked the ChangeLogs of the kernel from 2.6.21.2 to current but
there doesn't seem to have been a relevant patch on this matter.

"Please help" ;-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-12-22 10:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-19 11:42 Possible bug ipsec and SNAT? Slagter, EM
2007-12-19 14:44 ` Patrick McHardy
2007-12-20 10:51   ` Slagter, EM
2007-12-22  7:37     ` Patrick McHardy
2007-12-22 10:49       ` Slagter, EM

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).