Re: Auto-killing connections when changing IP?
- From: Unruh <unruh-spam@xxxxxxxxxxxxxx>
- Date: Thu, 11 Oct 2007 23:37:37 GMT
Stefan Monnier <monnier@xxxxxxxxxxxxxxxx> writes:
Is there some way to kill all TCP connections that go over the network
interface `foo' whenever this interface is brought up with an IP address
different from the one it had before?
When it is brought down all tcp connections die. HOwever, the programs on
the two ends may well try again.
Ie, just because the network is brought down does not mean that say ssh
dies or something-- why should it? It will simply send out more packets.
The machine at the other end may or may not get upset when it suddenly sees
packets arive from a different IP.
But that is clearly not under your control.
Try an iptables -t nat ... -j MASQUERADE rule
Where... on the router? I have no control on the router(s).
... on my laptop? I have no `nat' table on my laptop (my iptables are 100%
empty).
Stefan.
- Follow-Ups:
- Re: Auto-killing connections when changing IP?
- From: Stefan Monnier
- Re: Auto-killing connections when changing IP?
- References:
- Auto-killing connections when changing IP?
- From: Stefan Monnier
- Re: Auto-killing connections when changing IP?
- From: Chris Davies
- Re: Auto-killing connections when changing IP?
- From: Stefan Monnier
- Auto-killing connections when changing IP?
- Prev by Date: Re: Auto-killing connections when changing IP?
- Next by Date: Re: Auto-killing connections when changing IP?
- Previous by thread: Re: Auto-killing connections when changing IP?
- Next by thread: Re: Auto-killing connections when changing IP?
- Index(es):
Relevant Pages
|