I am looking for various ways to keep VPN connection alive on a Unix based system when I am idle. One way I know is run a command like "top"


which continuously runs. Is there any other way or better solution to it?

  • 1
    N=1; while ((1)); echo yay $N; N=$((N+1)); sleep 6; done? Really, anything that will keep sending bytes. But a VPN connection shall not die when it is idle, you likely have a firewall dropping connections after some time. – grochmal Aug 12 '16 at 3:33
  • 2
    Since all of my systems run X11, I simply have an xclock being displayed through any connection I have to keep "live". It guarantees that some amount of background traffic will always be there, but not enough to actually impact anything. As a side benefit, if the link goes down, I can look at what time the xclock stopped updating to know when. – MAP Aug 12 '16 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.