I use vpnc on Linux, and with our corporate VPN setup (it's a Cisco something or other router), it's not exactly rock-solid. I run most things inside screen, so it's not a huge deal, but isn't there some way of maintaining connections across VPN restarts?
It seems like if I had a separate router box running vpnc, I would get it for free just by setting that box as my gateway. How can I emulate the same behavior with a single box?
When the VPN restarts, I get a different IP address and MAC address on the tun0 or tap0 device.
I tried playing games by using tap0 for the tunnel and then bridging it to various things (dummy devices, loopbacks, etc.), but couldn't get anything working.
You could run ppp over your VPNed connection to something on the other side that gives you a static IP. Run all of your stuff over that connection, and make it auto reconnect.
I wouldn't call it pretty, but it would work! :)
If your IP address changes when the VPN restarts there's really not much you can do about it - the change of IP address is going to kill any active sessions.