From: Max Kellermann <max@duempel.org>
To: linux-kernel@vger.kernel.org
Subject: problem with 2.6.10 + ipsec/tunnel + netfilter
Date: Sun, 26 Dec 2004 17:40:22 +0100 [thread overview]
Message-ID: <20041226164022.GA2631@roonstrasse.net> (raw)
Hi,
I upgraded my router today to 2.6.10, from 2.6.9-rc3. It has three
network adapters: ppp0(eth0) for Internet, eth2 is WLAN and eth0 is
ethernet. My notebooks connected on eth2 use ipsec (tunnel mode,
172.28.1.x/32 - 0.0.0.0/32) to secure the wireless connection.
Since I upgraded to 2.6.10, the router won't route packets which come
from the tunnel. It used to receive ESP packets, decrypted them, got
the new destination IP address, and routed them like normal incoming
packets. Downgrading to 2.6.9-rc3 makes the problem disappear.
It seems like the decrypted packets don't get the routing table
applied to them: tcpdump shows them on eth2 (but not on eth0 or ppp0);
they go through mangle/PREROUTING and nat/PREROUTING (I added LOG
lines to my netfilter config), and disappear afterwards. My theory is
that the ESP went through the routing before, and the decrypted packet
still holds this routing information, which is not updated - the
router drops the packet because it's marked as INPUT packet but with a
non-matching destination IP for device eth2.
I tried a hack: I used the experimental ROUTE target to force the
incoming packet from eth2 to be routed over eth0; tcpdump output from
172.28.0.7:
17:01:03.519720 IP 172.28.1.8.33025 > 172.28.0.7.22: S 505307695:505307695(0) win 5840 <mss 1460,sackOK,timestamp 14143937 0,nop,wscale 2>
17:01:03.519763 IP 172.28.0.7.22 > 172.28.1.8.33025: S 29430865:29430865(0) ack 505307696 win 5792 <mss 1460,sackOK,timestamp 5854568 14143937,nop,wscale 2>
17:01:03.520168 IP 172.28.0.1 > 172.28.0.7: icmp 68: 172.28.1.8 tcp port 33025 unreachable
The last packet in this dump is a REJECT rule on the router for "state
INVALID" packets (i.e. connection tracking is broken here). After I
removed the INVALID/REJECT rule, it works. To work around this
problem, I can build a copy of the routing table as ROUTE rules and
remove all FORWARD/INVALID rules.
More information about my router:
- kernel: http://max.kellermann.name/~max/linux/squirrel.config
- ipsec (the keys are removed, of course):
http://max.kellermann.name/~max/linux/ipsec.conf
- dual pentium III-800, gcc
- Linux version 2.6.10 (root@squirrel) (gcc version 3.3.4 (Debian
1:3.3.4-13)) #1 SMP Sun Dec 26 16:53:40 CET 2004
Regards,
Max Kellermann
next reply other threads:[~2004-12-26 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-26 16:40 Max Kellermann [this message]
2004-12-26 17:07 ` problem with 2.6.10 + ipsec/tunnel + netfilter Patrick McHardy
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=20041226164022.GA2631@roonstrasse.net \
--to=max@duempel.org \
--cc=linux-kernel@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