Re: Auto-killing connections when changing IP?



Hello,

Chris Davies a écrit :
Stefan Monnier <monnier@xxxxxxxxxxxxxxxx> wrote:

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?

Try an iptables -t nat ... -j MASQUERADE rule

Note that this won't affect existing connections in the TCP/IP stack and sockets ; it will only erase them in the Netfilter connection tracking table. Also note that it won't make a difference whether the interface is brought up again with a different address.
.



Relevant Pages

  • Re: Sport and the future
    ... I also join Bruce to first define an API for sockets (and ... Presto, we have an instance interface, and as ... libraries than the implementation of them, but I do think the FFI ... As a user of this pearl (or string of pearls ...
    (comp.lang.smalltalk)
  • Re: resolving ip address to a specific network
    ... Sockets are opened by a process (or more accurately, ... "listen" on port 80 using a socket created/owned by the httpd process. ... >> If you have proper interface netmasks and routing, ... packets to a process (a.k.a. a network application). ...
    (comp.os.linux.networking)
  • Re: resolving ip address to a specific network
    ... Sockets are opened by a process (or more accurately, ... "listen" on port 80 using a socket created/owned by the httpd process. ... >> If you have proper interface netmasks and routing, ... packets to a process (a.k.a. a network application). ...
    (comp.os.linux.misc)
  • Re: Telnet Using C#
    ... A *full* implementation of a telnet client (with complete vt100 ... familiar with sockets, and is a reasonably simple "my first sockets ... General-purpose network utilities ... This is very inefficient and leads to a sluggish interface. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: credentials at other end of local socket/stream/pipe
    ... >sockets to pass data between unrelated processes. ... instead of defining a getpeernameinterface. ... SO_PEERCRED doesn't exist in Solaris; Solaris 9 and below have some ... similar functionality; S10 has much more. ...
    (comp.unix.solaris)