[NCLUG] Re: Switching IPs & Maintaining Connections (jeff)

scottkly at frii.com scottkly at frii.com
Mon Jan 31 12:15:41 MST 2005

> The problem is that each time I switch IPs, I need to restart a
> lot of these connections. The xterms are particularily a pain
> to re-setup. I know I could use `screen` for this, but that
> only gets me half-way, as I'd still have to restart `screen` on
> each of them.

Screen has a lot of other functionality that make it a tool worth
learning, and screen is a very reliable way to recover a session.

> I was wondering if there was some way to proxy this via
> localhost or something, where I could just change my external
> IP, but not lose any of the connections. Or perhaps there is
> another way...

A combination of a port and an IP address makes a socket.  Together, two
sockets create a unique connection.  In order to maintain connections
while changing your IP, you'll need to keep the same IP address as it
appears to the remote site.

You can accomplish this using a VPN to a public server, or perhaps through
a publicly accessible proxy server.  In either case, you'll have to have
all connections that you'll maintain tunneling through the same IP address
before and after you change IPs.

I use openvpn which usually allows me to maintain an 'idle' session to a
remote host when I connect again after suspending and driving to a coffee
shop, for example.  This works pretty well most of the time, but if I'm
doing something that's going to be printing to stdout or stderr (two
minutes without an ACK after traffic is sent will cause the connection to
timeout) or something that's important not to interrupt, like a kernel
build, I fire it up in a screen.


More information about the NCLUG mailing list