From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: terminating connections when an interface goes down
Date: Sat, 13 Mar 2004 18:44:50 +0000 [thread overview]
Message-ID: <200403131844.50093.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <1127959457.20040313192408@anime-h.com>
On Saturday 13 March 2004 6:24 pm, MaXxX wrote:
> Hello.
>
> Having recently switched to a faster ISP but with dynamically assigned
> (and forcibly changed every 24h) IP, I'd like the conntrack module to
> TERMINATE all active connections when the IP changes.
>
> So far I've been using the MASQUERADE target, but all the difference
> between it and SNAT is that it forgets its connections. What I'd like
> is that it terminated them - preferably by generating a two-way
> FIN+RST (or whatever a "terminate" packet looks like).
My recommendation is to use a utility quite independently of netfilter, which
gets called when your IP address changes (the dhcpcd-eth0.exe script would be
a good place to do this), and simply sends a suitable RST packet to each
connection found in /proc/net/ip_conntrack at the time it is called.
Netfilter will then sort itself out and remove the connection tracking table
entries when it sees the RST packets.
I'm sure you can find a ready-made utility for generating such RST packets
(they have to contain the right sequence number) if you don't want to do your
own coding.
If you still want to try building this into netfilter, I suggest you ask on
the developers' list instead of the users' list.
Regards,
Antony.
--
I want to build a machine that will be proud of me.
- Danny Hillis, creator of The Connection Machine
Please reply to the list;
please don't CC me.
next prev parent reply other threads:[~2004-03-13 18:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-13 18:24 terminating connections when an interface goes down MaXxX
2004-03-13 18:44 ` Antony Stone [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-03-02 12:39 MaXxX
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=200403131844.50093.Antony@Soft-Solutions.co.uk \
--to=antony@soft-solutions.co.uk \
--cc=netfilter@lists.netfilter.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