How can I keep a VPN connection alive?

5,872

From VPNC seems to timeout quickly- how do I lengthen the timeout?

To keep the VPNC connection open indefinitely add this line
DPD idle timeout (our side) 0
to your .conf file in /etc/vpnc and I think that will effectively resolve the timeout problem.

For example:

IPSec gateway <your_gateway>
IPSec ID linux
IPSec secret <your_group_password>
Xauth username <your_username>
DPD idle timeout (our side) 0
Share:
5,872

Related videos on Youtube

BinaryMisfit
Author by

BinaryMisfit

Living in sunny Durban, South Africa, I have been actively involved in IT since 1995. I develop software for a major retail chain. When not in front of the computer I spend time with my family.

Updated on September 17, 2022

Comments

  • BinaryMisfit
    BinaryMisfit over 1 year

    I've been trying to find a way to run a torrent client strictly through a VPN. I am running Ubuntu 9.10, and use Ktorrent. I can connect to vpn.itshidden.com but I am worried about the connection dropping if I'm away from my computer. Any help would be appreciated.

  • Admin
    Admin about 14 years
    I just tried what you told me but it didn't work. I copied exactly what you typed.. Did I need to change anything? I have to apologize, I'm not to familiar with this so you may have to explain. The VPN I'm trying to connect to is vpn.itshidden.com, did I need to put that in the place of any.vpn.Ip.address?
  • James Bay
    James Bay about 14 years
    Yes, put the hostname or IP address of something that requires the VPN.
  • Admin
    Admin about 14 years
    harrymc, thank you for your post. I just want to make sure I'm dong this right. When I type in my info, do I need to keep the < > signs? And does that just stay as (our side) or do I need to put something in there? Sorry if this sounds stupid, I'm new to this.
  • Admin
    Admin about 14 years
    2 more things: is the IPSec secret my VPN account password? And what name do I save the .conf file under?
  • Admin
    Admin about 14 years
    That didn't work
  • harrymc
    harrymc about 14 years
    @Al: The <> have no meaning, and all the data relates to the VPN. See also this article: spiration.co.uk/post/1293/…
  • James Bay
    James Bay about 14 years
    What distro are you running? What did not work?
  • Admin
    Admin about 14 years
    I am running Ubuntu 9.10 32 bit. I copied and pasted */10 * * * * root ping -c 3 vpn.itshidden.com into /etc/crontab. I connected to my VPN account and it timed out and wouldn't come back on. I thought I may have had to restart the PC, but that didn't work either