Page 1 of 1

OpenVPN gets disconnected every hour

Posted: Wed Mar 21, 2012 10:49 am
by AllTime
Hi,

I have a recompiled version of openvpn with --enable-password-save option.

In my openvpn command, I give :
--config <.ovpb file> --auth-user-pass <.txt file with username/password> --auth-nocache --ca <.cer file>

Server contains reneg-sec 3600 explicitly as we want to change the keys oftenly.

I get connected to the openvpn properly but on every hour, it gets disconnected with the mesage :

Code: Select all

Wed Mar 21 11:47:03 2012 Initialization Sequence Completed
Wed Mar 21 12:46:54 2012 TLS: soft reset sec=-1 bytes=32503964/0 pkts=44010/0
Wed Mar 21 12:46:54 2012 ERROR: could not read Auth username from stdin
Wed Mar 21 12:46:54 2012 Exiting
TLS line is found sometimes and not always.
I tried adding reneg-sec 0 & 806400 to command, but no difference. I was under the impression that due to deleting .txt & .ovpn files this must be the issue - so I don't delete those fiels now but yet no difference.

What more can be the cause for this problem ?
Can anyone help me know why do I get this error and how do I solve it.

From few days am trying to solve this issue but can't find any proepr helpline.

Any help is highly appreciated. Please try to help me at the earlist.

Thanks

Re: OpenVPN gets disconnected every hour

Posted: Wed Mar 21, 2012 12:55 pm
by janjust
what happens if you run it without '--auth-nocache', i.e.

Code: Select all

--auth-user-pass <.txt file with username/password>
does that work? why would you NOT want to cache the username/password if you ARE using a password file?

Re: OpenVPN gets disconnected every hour

Posted: Thu Mar 22, 2012 6:00 am
by AllTime
Thanks,
I am already trying with that part (removed auth-nocache) and will let you know as soon as I see the results.

I am lost a bit, can you help me :
When openvpn is about to reconnect, what are the logs of it ? I mean does it exit and then do its work or some other way out. Can I about to see the logs of it ?

I want to see the difference in both the logs and thus help me know my issue.

My LOSTING Factor is : My application looks out for "Exiting" (along with previous logs) and based on all criteria's app connects to vpn again. According to my collegues, openvpn is not reconnecting the way it should. And also passord file doesn't help in reconnecting. :?:

So am like confused and don't know what exactly is requred . Once I can know that I can think to achieve it working on "How" :roll: . I surfed alot but couldn't get what I am looking for.

Please help and guide me accordingly.

Thanks a lot.