Linux Netfilter discussions
 help / color / mirror / Atom feed
From: <user01@vrwg.net>
To: netfilter@lists.samba.org
Subject: connection tracking + DNAT + ip-change ... BOOM :)
Date: Fri, 07 Jun 2002 10:17:15 +0200	[thread overview]
Message-ID: <3D006C0B.83A4A14A@hyde.vege> (raw)


good evening !

currently i'm trying to set up a ipip-tunnel via two dialup-router.
setup as follws:

host1 -- (DMZ) -- router1 -- (INTERNET-CLOUD) -- router2 -- (DMZ) -- host2

between host1 and host2 i've established the ipip-tunnel. both routers
are set up this way:

"iptables -t nat -A PREROUTING -i eth1 -p ipencap -j DNAT --to-destination
IP_OF_INTERNAL_HOST"
"iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE"

both client's tunnel are set up like this

"ip tun a test mode ipip remote EXTERNAL_IP_OF_REMOTE_ROUTER local MY_LOCAL_IP
dev eth0\x13"
(EXTERNAL_IP_OF_REMOTE_ROUTER refers to the router on the other side of the
i-net-cloud.)

eth1 is the external interface to the "internet-cloud" on both routers.

as long as both routers external interface-ip's (eth1) don't change everything
is OK. if the external ip EXTERNAL_IP_OF_REMOTE_ROUTER changes i change
the tunnel with a small shell-script. the encapsulated packets are immediately
sent to the new destination ip.

BUT: the remote-router (whose external ip has changed) receives the packets,
but does notn DNAT them any more. is refuses to DNAT them as long as theres
an entry for the old tunnel-"connect"/"traffic" in /proc/net/ip_conntrack.
if this entry vanishes the changed tunnel works as expected :/ (setting
the interface down and up again via
"ip set li down dev eth1 ; ip set li up dev eth1"  doesn't chanmge anything.
i've read in one of rusty tutorials that only the MASQUERADE module does
discard the
conntrack entrys if the interface goes down.
now i have questions:
1) removing the conntrack entry should do the job ... so how do i remove
   manually entrys from the conntrack table ? i've found no documentation
   on this :(
2) how do i keep DNAT away from connection tracking ??? ALL incoming packets
   for my external dialup-interface should be DNATted to the internal
   server. regardless of any connection state.
   in fact ipip-tunnel don't have any connection state (if i'm not wrong :) )

if you need more details to deploy an idea -> mail me :)  and thank you in
advance !

virtual


             reply	other threads:[~2002-06-07  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-07  8:17 user01 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-02 20:58 connection tracking + DNAT + ip-change ... BOOM :) user01

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=3D006C0B.83A4A14A@hyde.vege \
    --to=user01@vrwg.net \
    --cc=netfilter@lists.samba.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