# [SOLVED] Openvpn looses connection after 10..20 minutes

## r.osmanov

Hi.

My openvpn client (net-misc/openvpn) looses connection after 10..20 minutes.

Then I restart /etc/init.d/openvpn, and it works again. Found nothing interesting

in the openvpn log.

This is my configuration (/etc/openvpn/openvpn.conf)

```

client

dev tun

proto udp

nobind

#user nobody

#group nobody

persist-key

persist-tun

ca /etc/openvpn/keys/ca.crt

cert /etc/openvpn/keys/rosmanov.crt

key /etc/openvpn/keys/rosmanov.key

comp-lzo

verb 6

auth-user-pass /etc/openvpn/userpass

#remote-cert-tls server

ns-cert-type server 

auth-nocache 

push "explicit-exit-notify 3"

remote example.domain.com 1194

ping-restart 60

log /var/log/openvpn/client.log

```

How do I make it more stable?

Thanks.Last edited by r.osmanov on Fri Jan 18, 2013 3:00 pm; edited 1 time in total

----------

## Anon-E-moose

Is this a vpn service you are buying or one you've set up yourself or work set up?

----------

## r.osmanov

 *Anon-E-moose wrote:*   

> 
> 
> are you sure
> 
> remote example.domain.com 1194	
> ...

 

I just changed the domain for this forum.

 *Anon-E-moose wrote:*   

> 
> 
> I have my ping* commands set this way
> 
> Code:	
> ...

 

Thanks. I'll try with your settings.

 *Anon-E-moose wrote:*   

> 
> 
> Edit to add: Is this a vpn service you are buying or one you've set up yourself or work set up?
> 
> 

 

We configured it ourselves for company staff.

Thanks.

----------

## Anon-E-moose

It could be that the server end isn't set up properly.

I don't run a server but use a pay one, so I'm not sure what goes into that end.

Good luck

Edit to add: Is it losing connectivity while active or idle?

Is more than one computer trying to connect to the server with the same cert?

----------

## r.osmanov

 *Anon-E-moose wrote:*   

> It could be that the server end isn't set up properly.
> 
> Edit to add: Is it losing connectivity while active or idle?
> 
> Is more than one computer trying to connect to the server with the same cert?

 

I'm not sure, but most likely it lost connection on idle.

Yes, I connect to the host using the same cert from different machines.

But, it works fine now! The connection is present for about an hour. I guess it

won't loose it further.

Thanks!

----------

## Anon-E-moose

From my understanding, and I won't claim it's 100% accurate

You can't connect to a server with different machines, using the same cert at the same time.

I have read where it causes some machines to lose connectivity.

I don't use more than one machine at a time, so I can't try it out.

Glad you got it solved.

----------

## r.osmanov

No, it's not at the same time  :Smile:  I meant I use single cert for multiple machines(clients).

It still sometimes stalls. But it happens rarely. However, I'm satisfied with it.

----------

